OCRO-834: Modular-strategies ABIs + typechain package#277
Conversation
…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>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds 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. ChangesModular Strategies Integration
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
config.jsonsrc/abis/MapleGlobalsV5.abi.jsonsrc/abis/MapleLiquidityRouter.abi.jsonsrc/abis/MapleStrategyDeployer.abi.jsonsrc/abis/MapleStrategyManager.abi.jsonsrc/abis/MapleTradingStrategy.abi.jsonsrc/abis/PoolManagerV500.abi.jsonsrc/abis/StrategyManagerFactory.abi.jsonsrc/abis/TradingStrategyFactory.abi.jsonsrc/addresses/base-mainnet-prod.tssrc/addresses/mainnet-dev.tssrc/addresses/mainnet-prod.tssrc/addresses/sepolia-dev.tssrc/addresses/sepolia-prod.tssrc/index.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>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/addresses/mainnet-prod.ts (1)
77-78:⚠️ Potential issue | 🟠 MajorComplete 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
📒 Files selected for processing (20)
config.jsonscripts/build-typechain.jssrc/abis/AaveV3StrategyFactory.abi.jsonsrc/abis/MapleAaveV3Strategy.abi.jsonsrc/abis/MapleAaveV3StrategyInitializer.abi.jsonsrc/abis/MapleSkyStrategyV2.abi.jsonsrc/abis/MapleSkyStrategyV2Initializer.abi.jsonsrc/abis/MapleStrategyManager.abi.jsonsrc/abis/MapleStrategyManagerInitializer.abi.jsonsrc/abis/MapleTradingStrategy.abi.jsonsrc/abis/MapleTradingStrategyInitializer.abi.jsonsrc/abis/PoolManagerV500.abi.jsonsrc/abis/PoolManagerV500Initializer.abi.jsonsrc/abis/SkyStrategyFactory.abi.jsonsrc/addresses/base-mainnet-prod.tssrc/addresses/mainnet-dev.tssrc/addresses/mainnet-prod.tssrc/addresses/sepolia-dev.tssrc/addresses/sepolia-prod.tssrc/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
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>
- 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>
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>
Details
modularStrategiescontract package (config.json + typechain + index exports); zero-address placeholders in all five network address files.Decisions considered in review
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.scripts/update_sdk.sh <version>after release.Initializedevents are grafted onto the five proxied implementation ABIs via the establishedmergeEventspattern — 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
Chores