Skip to content

OCRO-834: Modular-strategies ABIs + typechain package#277

Merged
Jakkc merged 8 commits into
mainfrom
ocro-834-modular-abis
Jul 24, 2026
Merged

OCRO-834: Modular-strategies ABIs + typechain package#277
Jakkc merged 8 commits into
mainfrom
ocro-834-modular-abis

Conversation

@Jakkc

@Jakkc Jakkc commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Details

  • Adds the full modular-release ABI set (alpha.1): Globals v5, PoolManager v500 + initializer, StrategyManager + initializer + Deployer + LiquidityRouter + factory, TradingStrategy + initializer + factory, AaveV3Strategy and SkyStrategyV2 + initializers + factories (17 contracts).
  • ABIs were extracted from standalone foundry builds of each contract repo — maple-deploy's combined build holds the old MapleGlobals/MaplePoolManager under the same artifact names, so each ABI was verified by a v5-only marker function before export.
  • New modularStrategies contract package (config.json + typechain + index exports); zero-address placeholders in all five network address files.

Decisions considered in review

  • Names match both the subgraph branch (offp-608-modular-upgrade) and the maple-deploy localhost bundle exactly — localhost resolves addresses from the bundle, so only live networks wait on the placeholder addresses.
  • No version bump here — left to the publish flow. Consumers repin via scripts/update_sdk.sh <version> after release.
  • Initializer Initialized events are grafted onto the five proxied implementation ABIs via the established mergeEvents pattern — emitted from the instance address, so indexers must decode them against the implementation ABI.

Pairs with maple-labs/maple-deploy#509 (deploys the contracts these ABIs describe).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added new ABI interfaces for Modular Strategies, including MapleGlobalsV5, pool/strategy manager and trading/aave/sky strategy contracts, plus their factories/initializers.
    • Added ABIs for the Pool Manager v500, its initializer, and v500 migrator; also added Maple liquidity router and strategy deployer ABIs.
    • Updated exported contract-factory collections and network address mappings for Modular Strategies support.
  • Chores

    • Reformatted contract package configuration for clarity and expanded Modular Strategies package definitions.
    • Updated the ABI build process to merge additional initializer/migrator-related events.

…ceholders

Eight ABIs for the modular release (alpha.1), extracted from standalone
foundry builds of each contract repo so shared names (MapleGlobals,
MaplePoolManager) cannot leak older versions:

- MapleGlobalsV5, PoolManagerV500
- MapleStrategyManager, MapleStrategyDeployer, MapleLiquidityRouter,
  StrategyManagerFactory (strategy-manager-private v1.0.0-alpha.1)
- MapleTradingStrategy, TradingStrategyFactory (trading-strategy-private
  v1.0.0-alpha.1)

Names match the subgraph's modular data sources (offp-608-modular-upgrade)
and the maple-deploy localhost bundle. New modularStrategies contract
package + typechain bindings + index exports; zero-address placeholders in
every network file until the live deployments exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Modular Strategies contract ABIs, configures their contract package, merges initializer and migrator events during Typechain generation, registers zero-address placeholders across network maps, and exports factory mappings.

Changes

Modular Strategies Integration

Layer / File(s) Summary
Modular Strategies package configuration
config.json
Reformats contract arrays and adds the modularStrategies package with the new contract names.
Core contract and factory ABIs
src/abis/MapleGlobalsV5.abi.json, src/abis/MapleLiquidityRouter.abi.json, src/abis/MapleStrategyDeployer.abi.json, src/abis/PoolManagerV500*.abi.json, src/abis/PoolManagerV400.abi.json, src/abis/*Factory.abi.json
Adds governance, routing, deployment, pool management, instance creation, implementation registration, upgrade-path, and upgrade ABI definitions.
Strategy and initializer ABIs
src/abis/MapleAaveV3Strategy*.abi.json, src/abis/MapleSkyStrategyV2*.abi.json, src/abis/MapleStrategyManager*.abi.json, src/abis/MapleTradingStrategy*.abi.json
Adds strategy operations, configuration accessors, lifecycle events, and initializer interfaces.
Typechain event wiring
scripts/build-typechain.js
Merges initializer and migrator events into the corresponding target contract ABIs during Typechain generation.
Address and factory exports
src/addresses/*.ts, src/index.ts
Adds zero-address placeholders across network maps and exports the Modular Strategies factory mappings.

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

Suggested reviewers: michaelsmueller

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning It covers the change details, but it misses the template's Ticket, Problem, Solution, Other notes, and Screenshots sections. Add the required template sections and fill in the problem, solution, ticket link, and any testing or screenshot notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: modular-strategies ABIs and TypeChain package support.
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 ocro-834-modular-abis

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: 1

🤖 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 `@src/addresses/mainnet-prod.ts`:
- Around line 76-77: Add zero-address entries for MapleGlobalsV5 and
PoolManagerV500 in the address maps of src/addresses/mainnet-prod.ts (lines
76-77), src/addresses/base-mainnet-prod.ts (lines 76-77),
src/addresses/mainnet-dev.ts (lines 76-77), src/addresses/sepolia-dev.ts (lines
76-77), and src/addresses/sepolia-prod.ts (lines 76-77), preserving the existing
exported contract key structure.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 52559e0d-7576-4bea-8230-0e0d90aba071

📥 Commits

Reviewing files that changed from the base of the PR and between bae40ad and 0457ccf.

📒 Files selected for processing (15)
  • config.json
  • src/abis/MapleGlobalsV5.abi.json
  • src/abis/MapleLiquidityRouter.abi.json
  • src/abis/MapleStrategyDeployer.abi.json
  • src/abis/MapleStrategyManager.abi.json
  • src/abis/MapleTradingStrategy.abi.json
  • src/abis/PoolManagerV500.abi.json
  • src/abis/StrategyManagerFactory.abi.json
  • src/abis/TradingStrategyFactory.abi.json
  • src/addresses/base-mainnet-prod.ts
  • src/addresses/mainnet-dev.ts
  • src/addresses/mainnet-prod.ts
  • src/addresses/sepolia-dev.ts
  • src/addresses/sepolia-prod.ts
  • src/index.ts

Comment thread src/addresses/mainnet-prod.ts
…entations

Completes the alpha.1 ABI set: MapleAaveV3Strategy and the modular Sky
strategy (named MapleSkyStrategyV2 — the legacy contract owns
MapleSkyStrategy.abi.json) plus their factories and initializers.

Grafts Initialized events from the initializer ABIs onto the
implementation ABIs (PoolManagerV500, MapleStrategyManager,
MapleTradingStrategy, MapleAaveV3Strategy, MapleSkyStrategyV2) via
mergeEvents, per the established pattern — the event is emitted from the
instance address, so indexers decode it against the implementation ABI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@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.

♻️ Duplicate comments (1)
src/addresses/mainnet-prod.ts (1)

77-78: ⚠️ Potential issue | 🟠 Major

Complete the modularStrategies address registry.

The five network maps still omit configured modularStrategies keys, including MapleGlobalsV5, PoolManagerV500, their initializer, and the strategy implementation/initializer entries. Consumers resolving these contracts by name cannot receive the intended zero-address placeholder.

  • src/addresses/mainnet-prod.ts#L77-L78: add zero-address entries for all omitted modularStrategies contracts.
  • src/addresses/base-mainnet-prod.ts#L77-L78: add the same complete modularStrategies key set.
  • src/addresses/mainnet-dev.ts#L77-L78: add the same complete modularStrategies key set.
  • src/addresses/sepolia-dev.ts#L77-L78: add the same complete modularStrategies key set.
  • src/addresses/sepolia-prod.ts#L77-L78: add the same complete modularStrategies key set.
🤖 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 `@src/addresses/mainnet-prod.ts` around lines 77 - 78, Add the complete
modularStrategies address key set to each listed network map:
src/addresses/mainnet-prod.ts lines 77-78, src/addresses/base-mainnet-prod.ts
lines 77-78, src/addresses/mainnet-dev.ts lines 77-78,
src/addresses/sepolia-dev.ts lines 77-78, and src/addresses/sepolia-prod.ts
lines 77-78. Include MapleGlobalsV5, PoolManagerV500, their initializer, and the
strategy implementation and initializer entries, assigning the existing
zero-address placeholder to every key alongside MapleLiquidityRouter and
MapleStrategyDeployer.
🤖 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 `@src/addresses/mainnet-prod.ts`:
- Around line 77-78: Add the complete modularStrategies address key set to each
listed network map: src/addresses/mainnet-prod.ts lines 77-78,
src/addresses/base-mainnet-prod.ts lines 77-78, src/addresses/mainnet-dev.ts
lines 77-78, src/addresses/sepolia-dev.ts lines 77-78, and
src/addresses/sepolia-prod.ts lines 77-78. Include MapleGlobalsV5,
PoolManagerV500, their initializer, and the strategy implementation and
initializer entries, assigning the existing zero-address placeholder to every
key alongside MapleLiquidityRouter and MapleStrategyDeployer.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4824b96-0889-470d-b6a9-5df2a902943a

📥 Commits

Reviewing files that changed from the base of the PR and between 0457ccf and a190935.

📒 Files selected for processing (20)
  • config.json
  • scripts/build-typechain.js
  • src/abis/AaveV3StrategyFactory.abi.json
  • src/abis/MapleAaveV3Strategy.abi.json
  • src/abis/MapleAaveV3StrategyInitializer.abi.json
  • src/abis/MapleSkyStrategyV2.abi.json
  • src/abis/MapleSkyStrategyV2Initializer.abi.json
  • src/abis/MapleStrategyManager.abi.json
  • src/abis/MapleStrategyManagerInitializer.abi.json
  • src/abis/MapleTradingStrategy.abi.json
  • src/abis/MapleTradingStrategyInitializer.abi.json
  • src/abis/PoolManagerV500.abi.json
  • src/abis/PoolManagerV500Initializer.abi.json
  • src/abis/SkyStrategyFactory.abi.json
  • src/addresses/base-mainnet-prod.ts
  • src/addresses/mainnet-dev.ts
  • src/addresses/mainnet-prod.ts
  • src/addresses/sepolia-dev.ts
  • src/addresses/sepolia-prod.ts
  • src/index.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/index.ts
  • src/abis/PoolManagerV500.abi.json
  • src/abis/MapleStrategyManager.abi.json
  • src/abis/MapleTradingStrategy.abi.json

Jakkc and others added 2 commits July 22, 2026 10:52
The v4->v5 migrator emits StrategyRemoved from the pool manager's own
address during upgrade — same declared-elsewhere pattern as the
initializer events. The subgraph's v5 template handles it and needs it
in the implementation ABI to codegen.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The migrator fires during the v4->v5 upgrade transaction, before the v5
subgraph template exists — so it's the v4 template that must decode
StrategyRemoved, same pattern as PoolPermissionManagerSet on V3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread scripts/build-typechain.js Outdated
Comment thread src/index.ts Outdated
Jakkc and others added 3 commits July 24, 2026 10:05
- Remove migrator StrategyRemoved graft from PoolManagerV500 ABI; V500 has
  no removeStrategy, only the migrator emits it during the v4->v5 upgrade
  tx, which decodes against the V4 template
- Move mapleGlobalsV5 and poolManagerV500 out of modularStrategies into
  their own export groups, matching the poolManagerV400 pattern
- Add zero-address placeholders for MapleGlobalsV5, PoolManagerV500(Initializer)
  and modular strategy implementation/initializer keys to all network maps

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v1.14.0 (released 2026-07-23) hangs all registry fetches through its
proxy until yarn's 60s socket timeout, failing the install step.
Pin CI and release workflows to the last working version; unpin once
fixed upstream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The action's version check rejects the v-prefixed form; the toolcache
stores it as 1.13.1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jakkc
Jakkc enabled auto-merge July 24, 2026 14:33
Root cause was a Socket API incident (resolved), not the v1.14.0
release. Back to floating latest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jakkc
Jakkc merged commit e0fcb49 into main Jul 24, 2026
5 checks passed
@Jakkc
Jakkc deleted the ocro-834-modular-abis branch July 24, 2026 14:52
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.

2 participants