feat: MinimalInterchainAccountRouter for Igra#8323
Conversation
3b7e39a to
cda4fdf
Compare
c304b0b to
508bc25
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8323 +/- ##
==========================================
+ Coverage 76.49% 76.79% +0.30%
==========================================
Files 128 130 +2
Lines 3416 3443 +27
Branches 290 291 +1
==========================================
+ Hits 2613 2644 +31
+ Misses 786 782 -4
Partials 17 17
🚀 New features to boost your workflow:
|
…ize limits Stripped-down InterchainAccountRouter that removes commit-reveal functionality, unused function overloads, and the CommitmentReadIsm sub-deployment. Reduces initcode from 35,996 to 19,256 bytes (~46.5% reduction) to fit under Igra's 100k storage mass limit per L1 transaction.
Made commitmentIsm optional in IcaRouterConfigSchema. When omitted, the deployer uses MinimalInterchainAccountRouter (3 constructor args) instead of the full InterchainAccountRouter (5 args). EvmIcaReader gracefully handles missing CCIP_READ_ISM. Infra deploy and check-deploy skip commitmentIsm config for chains in minimalIcaChains (igra).
…ountRouter support
…loyer cache write
Extract shared tests (enrollment, callRemoteWithOverrides, ISM routing, ICA accounts, value send/receive, salts) into InterchainAccountRouterSharedTest. MinimalInterchainAccountRouter.t.sol now inherits it, overriding only _deployRouter.
…ection implementation() is too broad — DomainRoutingIsm and upgradeable proxies also expose it, causing false positives. bytecodeHash() is unique to ICA routers.
The retry action allows 3 attempts × 8min + wait time, which can exceed the previous 10min job timeout.
508bc25 to
e028f94
Compare
|
@claude security review pls |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
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:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a MinimalInterchainAccountRouter and AbstractInterchainAccountRouter, updates SDK types/readers to detect MINIMAL vs REGULAR routers, adapts infra/deploy/check scripts and configs for minimal chains, and adds tests and changesets to support minimal ICA deployments. Changes
Sequence DiagramsequenceDiagram
participant User as User
participant Router as MinimalICA Router
participant Mailbox as Mailbox
participant ISM as ISM
participant RemoteAccount as Remote ICA
participant Target as Target Contract
User->>Router: callRemoteWithOverrides(dest, calls, metadata)
Router->>Mailbox: dispatch(destination, body, hook, metadata)
Mailbox->>ISM: verify message
ISM-->>Mailbox: verification result
Mailbox-->>Router: mailbox callback / delivery
Router->>Router: derive salt & getDeployedInterchainAccount (Create2 if needed)
Router->>RemoteAccount: execute multicall(calls) payable
RemoteAccount->>Target: perform calls
Target-->>RemoteAccount: return results
RemoteAccount-->>Router: execution result
Router-->>User: return dispatch/receipt
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fa4ec61 to
6b98091
Compare
Reverted CCIP_READ_ISM catch to bare catch block, consistent with EvmIsmReader and EvmHookReader contract-probing patterns. Added missing CAST comment for the double-cast in InterchainAccountDeployer.
6b98091 to
eb0b232
Compare
Hooks like IGP and ProtocolFee refund overpayment to message.senderAddress() which resolves to the router contract. Without receive(), the refund sendValue() call reverts, causing dispatches with native value to fail.
…rrors Extracted isIcaRouter() helper in EvmIsmReader to eliminate duplicated CCIP_READ_ISM/bytecodeHash probe logic. Added solhint-disable comments for intentional virtual override in AbstractInterchainAccountRouter.
…d code The second isIcaRouter call was unreachable after the early return from the first. Now calls once, stores the result, and flows through to populate the domain→ISM mapping for ownable ICA routers.
Stub Ownable__factory and fix DefaultFallbackRoutingIsm domains() mock to return empty array instead of rejecting, since the refactored code now flows through owner/domains checks before the ICA branch.
yorhodes
left a comment
There was a problem hiding this comment.
2026-03-17T19:29:53.8590991Z Detected bytecode changes:
2026-03-17T19:29:53.8591947Z Only in solidity/HEAD-bytecode: MinimalInterchainAccountRouter-bytecode.txt
2026-03-17T19:29:53.8592685Z
2026-03-17T19:29:53.8661735Z Bytecode changes detected.
2026-03-17T19:29:53.8662032Z
2026-03-17T19:29:53.8882410Z Found @hyperlane-xyz/core changeset with 'minor' bump (required: patch or higher)
2026-03-17T19:29:53.8883466Z
2026-03-17T19:29:53.8884010Z Bytecode changes are permitted with the existing changeset.
LGTM, ICA router bytecode unchanged
Summary
Igra (Kaspa L2/EVM) has a 100k storage mass limit per L1 transaction. The full
InterchainAccountRouterdeployment exceeds this (~147k storage mass, ~36KB initcode). This PR adds a stripped-downMinimalInterchainAccountRouterthat fits under the limit and wires it through the SDK/infra with explicit config-driven selection.Changes
Solidity
MinimalInterchainAccountRouter.sol— New contract that removes commit-reveal, unused overloads,CommitmentReadIsm,CCIP_READ_ISMimmutable, andreceive(). Constructor takes 3 args(mailbox, hook, owner)instead of 5. Account derivation (salt, CREATE2) is identical to the full router — ICAs are interoperable.SDK
types.ts— AddedIcaRouterTypeenum ('regular' | 'minimal'). OptionalrouterTypefield onIcaRouterConfigSchema— defaults to regular when omitted.InterchainAccountDeployer.ts— Selects router variant based onrouterType. Validates config consistency: regular requirescommitmentIsm, minimal rejects it. UsesdeployContractFromFactorywith manualwriteCache(keyed asminimalInterchainAccountRouter) for crash recovery. Minimal deployments verify asMinimalInterchainAccountRouter.EvmIcaReader.ts— DerivesrouterTypefrom on-chain state (CCIP_READ_ISM present → regular, absent → minimal).EvmIsmReader.ts— AfterCCIP_READ_ISM()fails, falls back toimplementation()probe to detect minimal ICA routers asINTERCHAIN_ACCOUNT_ROUTING.contracts.ts— Removed unusedminimalInterchainAccountFactories.Infra
chain.ts—minimalIcaChains: ['igra']list.deploy.ts/check-utils.ts— Minimal chains get explicitrouterType: MINIMAL; all others omit it (defaults to regular).verification.json— Fixed igra entry name toMinimalInterchainAccountRouter.Tests
InterchainAccountRouterSharedTest) with 20 tests covering enrollment, callRemoteWithOverrides, ISM routing, ICA accounts, value send/receive, and salts. BothInterchainAccountRouterTestandMinimalInterchainAccountRouterTestinherit it via_deployRouteroverride — no test duplication.Driveby
.github/workflows/test-env.yml— Increased jobtimeout-minutesfrom 10 to 30. The retry action allows 3 attempts × 8min + wait time, which could exceed the previous 10min job timeout.Other
AGENTS.md— Fixedpnpm prettier→pnpm format.package.json— Added"prettier"script alias.Test plan
pnpm buildpassespnpm lintpasses🤖 Generated with Claude Code
Note
Medium Risk
Adds a new ICA router contract variant and changes deployment/config/detection paths across Solidity, SDK, and infra; misconfiguration or selector/interface mismatches could affect ICA deployments on targeted chains.
Overview
Adds a new size-reduced
MinimalInterchainAccountRouterSolidity contract (no commit-reveal /CommitmentReadIsmsubdeployment) and factors shared ICA router logic intoAbstractInterchainAccountRouter, withInterchainAccountRouterupdated to inherit from it.Updates the TypeScript SDK and infra to select, deploy, and detect the minimal vs regular router via a new
IcaRouterType/routerTypeconfig field, including stricter config validation inInterchainAccountDeployerand on-chain detection inEvmIcaReader/EvmIsmReader.Adds/adjusts tests to run the shared ICA test suite against both router variants (new Forge test for minimal) and extends Hardhat tests for minimal deployment and config validation; infra config marks
igraas a minimal-router chain and updates verification metadata.Written by Cursor Bugbot for commit 456b465. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
New Features
Tests
Chores
Documentation