Skip to content

feat(allbridge): dynamic chainId mapping + Stellar destination (EXSC-650) [AllBridgeFacet v2.2.0]#2075

Open
0xDEnYO wants to merge 3 commits into
mainfrom
allbridge-stellar-dynamic-mappings
Open

feat(allbridge): dynamic chainId mapping + Stellar destination (EXSC-650) [AllBridgeFacet v2.2.0]#2075
0xDEnYO wants to merge 3 commits into
mainfrom
allbridge-stellar-dynamic-mappings

Conversation

@0xDEnYO

@0xDEnYO 0xDEnYO commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Which Linear task belongs to this PR?

EXSC-650 — sub-issue of EXSC-610 (Stellar facet adjustments), sibling of EXSC-616 (Polymer).

Why did I implement it this way?

Daniela needs AllBridgeFacet on staging with Stellar as a destination so she can drive the any→Stellar flow. Two things were needed:

1. Stellar support. AllBridge identifies chains by its own internal IDs; the facet translates bridgeData.destinationChainId → AllBridge chain ID. Stellar is allBridgeChainId 7 (key SRB/Soroban), taken from AllBridge's own token-info endpoint (it fills the gap at 7 in the existing 1–17 sequence; 15 = Algorand, 16 = Stacks). Stellar is non-EVM, so it rides the facet's existing non-EVM path (receiver == NON_EVM_ADDRESS, real recipient as a non-zero bytes32 in AllBridgeData.recipient) — no bridge-logic change, only the chain-ID entry.

2. Dynamic mapping (the "while we're here"). The mapping was a hardcoded if/else in _getAllBridgeChainId, so every new chain meant a facet redeploy + audit. I moved it to an owner-updatable diamond-storage mapping, mirroring exactly what EXSC-254 / PR #1847 did for PolymerCCTPFacet: initAllBridge (seeded in the diamond cut, selector excluded from the facet), setChainIdToAllBridgeChainId, unsetChainIdToAllBridgeChainId, getChainIdToAllBridgeChainId, NotInitialized guard, UnsupportedAllBridgeChainId on unmapped. Values live in config/allbridge.json under mappings. Version bumped 2.1.2 → 2.2.0 (MINOR: new external functions + new supported network), matching the Polymer precedent.

One deliberate deviation from the Polymer pattern: no +1 storage offset. AllBridge chain IDs start at 1 (Ethereum), so a stored 0 already means "unmapped" — the offset Polymer needs (its Ethereum domain is 0) would be noise here. Documented in the Storage struct.

config/allbridge.json and script/tasks/proposeAllBridgeChainIdMappings.ts (production mapping sync across chains, adapted from the Polymer analog) round it out.

Testing. 34 Solidity tests pass, including the full admin suite (owner-gating, NotInitialized, set/unset/get, init event) and the Stellar mapping assertion. Note: an on-fork live any→Stellar funds test isn't feasible — AllBridge's router only registered the Stellar corridor after this suite's pinned fork block, and its destination-token registry can't be reproduced on a fork (verified: getTransactionCost(7) returns 0 at the pinned block, and swapAndBridge reverts Bridge: unknown chain or token with a synthetic Stellar token). The non-EVM funds path is covered by the existing Solana fork test (identical code path); end-to-end any→Stellar is the staging QA step.

CalldataVerificationFacet does not decode AllBridge calldata, and the entrypoint/AllBridgeData signatures are unchanged, so no CVF bump and no clear-signing regeneration are needed.

Scope / follow-ups. This PR is the code change. Staging deploy is next (I can run deploy-contract, or Daniela can). Production rollout requires an audit first (facet logic change) — separate follow-up.

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

…idgeFacet v2.2.0] (EXSC-650)

Replace the hardcoded LI.FI-chainId -> AllBridge-chainId if/else in
AllBridgeFacet with an owner-updatable on-chain mapping (init / set /
unset / get), mirroring the PolymerCCTPFacet EXSC-254 pattern, and add
Stellar (LIFI_CHAIN_ID_STELLAR -> allBridgeChainId 7) so any->Stellar
bridging works via the existing non-EVM path. Config gains a `mappings`
array, the update script seeds it in the diamond cut, and a new
proposeAllBridgeChainIdMappings.ts syncs mappings across chains.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lifi-action-bot
lifi-action-bot marked this pull request as draft July 17, 2026 03:08
@github-actions github-actions Bot added the requires-types Trigger Types Bindings CI (ABI/type generation for lifi-contract-types) label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 15e9cd4c-c53a-4ba7-a0d5-ba46fc4f73d6

📥 Commits

Reviewing files that changed from the base of the PR and between 9d54021 and ca77b1d.

📒 Files selected for processing (2)
  • src/Facets/AllBridgeFacet.sol
  • test/solidity/Facets/AllBridgeFacet.t.sol
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/Facets/AllBridgeFacet.sol
  • test/solidity/Facets/AllBridgeFacet.t.sol

Walkthrough

Changes

AllBridge mapping rollout

Layer / File(s) Summary
Facet storage and mapping lifecycle
src/Facets/AllBridgeFacet.sol, test/solidity/Facets/AllBridgeFacet.t.sol, docs/AllBridgeFacet.md
AllBridge chain IDs are stored in diamond storage, managed through owner-only initialization/set/unset functions, documented, and covered by mapping, event, and revert tests.
Configured facet initialization
config/allbridge.json, script/deploy/facets/UpdateAllBridgeFacet.s.sol
Configured mappings are decoded from JSON and encoded into initAllBridge deployment calldata.
Mapping update proposal workflow
script/tasks/proposeAllBridgeChainIdMappings.ts
The CLI compares deployed mappings, builds timelock batch calldata, and submits deduplicated Safe proposals across eligible networks.
Staging deployment records
deployments/*.staging.json
AllBridgeFacet v2.2.0 entries and addresses are added or updated across supported staging deployment records, alongside related metadata changes.

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

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Title check ✅ Passed Clear and specific; it summarizes the dynamic chain-ID mapping and Stellar destination change.
Description check ✅ Passed It follows the template with task, rationale, and checklists, plus implementation, testing, and documentation details.
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 allbridge-stellar-dynamic-mappings

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.

❤️ Share

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

@lifi-action-bot lifi-action-bot changed the title feat(allbridge): dynamic chainId mapping + Stellar destination [AllBridgeFacet v2.2.0] (EXSC-650) feat(allbridge): dynamic chainId mapping + Stellar destination (EXSC-650) [AllBridgeFacet v2.2.0] Jul 17, 2026
@lifi-action-bot

lifi-action-bot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Test Coverage Report

Line Coverage: 90.20% (3351 / 3715 lines)
Function Coverage: 93.62% ( 514 / 549 functions)
Branch Coverage: 74.52% ( 629 / 844 branches)
Test coverage (90.20%) is above min threshold (89%). Check passed.

@0xDEnYO
0xDEnYO marked this pull request as ready for review July 17, 2026 03:31
@lifi-action-bot

Copy link
Copy Markdown
Collaborator

🤖 GitHub Action: Security Alerts Review 🔍

🟢 Dismissed Security Alerts with Comments
The following alerts were dismissed with proper comments:

🟢 View Alert - File: src/Facets/AllBridgeFacet.sol
🔹 Performing a narrowing downcast may result in silent overflow due to bit truncation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unsafe-downcast
🔹 Dismiss Reason: Won't fix
🔹 Dismiss Comment: This is intended

🟢 View Alert - File: src/Facets/AllBridgeFacet.sol
🔹 Performing a narrowing downcast may result in silent overflow due to bit truncation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unsafe-downcast
🔹 Dismiss Reason: Won't fix
🔹 Dismiss Comment: This is intended

🟢 View Alert - File: src/Facets/AllBridgeFacet.sol
🔹 Reentrant functions which emit events after making an external call may lead to out-of-order events. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/reentrancy-events
🔹 Dismiss Reason: Won't fix
🔹 Dismiss Comment: the function has reentrancy protection (via all its public entry points)

No unresolved security alerts! 🎉

@0xDEnYO
0xDEnYO requested a review from gvladika July 17, 2026 03:39
@0xDEnYO
0xDEnYO enabled auto-merge (squash) July 17, 2026 03:40
…sc, mainnet, optimism, polygon) (EXSC-650)

Deployment logs for the staging diamondCut + initAllBridge of AllBridgeFacet
v2.2.0 (dynamic chainId mapping + Stellar) at 0x1c1488c16d9d790e378B7354b35B0F12Dc9D4B49.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
script/tasks/proposeAllBridgeChainIdMappings.ts (1)

371-371: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Declare the CLI callback return type.

-  async run({ args }) {
+  async run({ args }): Promise<void> {

As per coding guidelines, TypeScript functions must use explicit return types.

🤖 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 `@script/tasks/proposeAllBridgeChainIdMappings.ts` at line 371, Update the
async run method to declare an explicit Promise-based return type in its
signature, preserving the existing callback behavior and implementation.

Source: Coding guidelines

🤖 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 `@script/tasks/proposeAllBridgeChainIdMappings.ts`:
- Around line 258-263: The scheduleBatch proposal currently uses Date.now() in
the salt, changing the Safe calldata and defeating deduplication on reruns.
Update the proposal-building logic around the salt and the corresponding batch
flow to use a stable salt for the intended batch, while supporting an explicit
operator-controlled epoch or salt when intentional replay is required; preserve
duplicate detection for identical proposals.

In `@src/Facets/AllBridgeFacet.sol`:
- Around line 96-104: Enforce the reserved zero sentinel at every AllBridge
mapping boundary: in src/Facets/AllBridgeFacet.sol lines 96-104, update
initAllBridge to reject zero chainId or allBridgeChainId with InvalidConfig
before writes; in lines 117-133, apply the same validation in the update path
before storage writes and events. In test/solidity/Facets/AllBridgeFacet.t.sol
lines 592-600, add InvalidConfig coverage for both zero fields during
initialization and updates.

In `@test/solidity/Facets/AllBridgeFacet.t.sol`:
- Around line 592-600: Expand
testRevert_SetChainIdToAllBridgeChainIdWithEmptyConfig coverage to verify
InvalidConfig for zero-valued chainId and allBridgeChainId mappings during both
initialization and updates. Add cases for each field being zero, while
preserving the existing empty-configuration assertion and using the established
setup and revert-checking patterns.

---

Nitpick comments:
In `@script/tasks/proposeAllBridgeChainIdMappings.ts`:
- Line 371: Update the async run method to declare an explicit Promise-based
return type in its signature, preserving the existing callback behavior and
implementation.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 051f49ab-b12c-4f69-98eb-fe82a3d785e1

📥 Commits

Reviewing files that changed from the base of the PR and between c408894 and 9d54021.

📒 Files selected for processing (16)
  • config/allbridge.json
  • deployments/arbitrum.diamond.staging.json
  • deployments/arbitrum.staging.json
  • deployments/bsc.diamond.staging.json
  • deployments/bsc.staging.json
  • deployments/mainnet.diamond.staging.json
  • deployments/mainnet.staging.json
  • deployments/optimism.diamond.staging.json
  • deployments/optimism.staging.json
  • deployments/polygon.diamond.staging.json
  • deployments/polygon.staging.json
  • docs/AllBridgeFacet.md
  • script/deploy/facets/UpdateAllBridgeFacet.s.sol
  • script/tasks/proposeAllBridgeChainIdMappings.ts
  • src/Facets/AllBridgeFacet.sol
  • test/solidity/Facets/AllBridgeFacet.t.sol

Comment thread script/tasks/proposeAllBridgeChainIdMappings.ts
Comment thread src/Facets/AllBridgeFacet.sol Outdated
Comment thread test/solidity/Facets/AllBridgeFacet.t.sol
@lifi-qa-agent

lifi-qa-agent Bot commented Jul 17, 2026

Copy link
Copy Markdown

🔍 QA Review — EXSC-650

🔗 Linear Ticket · Pull Request #2075

⚠️ Re-review — post-CHANGES_REQUESTED commit — Commit ca77b1d was pushed after the original review (2026-07-17T06:12:57Z). This re-review scopes analysis to changes in that commit and evaluates resolution of the 4 previously flagged items.


🔄 Resolution Status

# Item Severity Status
1 initAllBridge / setChainIdToAllBridgeChainId accept allBridgeChainId = 0 🟢 Low ✅ Fixed in ca77b1d
2 Fragile address(0) owner pattern in NotInitialized revert tests 🟢 Low ❌ Not addressed
3 No test for initAllBridge re-initialization behaviour 🟢 Low ❌ Not addressed
4 requires-types label — downstream type regeneration 🟢 Low ⚠️ Advisory (still present; process item)

✅ Finding #1 — Resolved

initAllBridge and setChainIdToAllBridgeChainId now both contain:

if (chainId == 0 || allBridgeChainId == 0) revert InvalidConfig();

The 0 sentinel is correctly enforced at both write boundaries, preventing a silent no-op mapping that _getAllBridgeChainId would immediately treat as unmapped. Four new tests cover all zero-field combinations across both the init and the update path:

  • testRevert_InitAllBridgeWithZeroChainId
  • testRevert_InitAllBridgeWithZeroAllBridgeChainId
  • testRevert_SetChainIdToAllBridgeChainIdWithZeroChainId
  • testRevert_SetChainIdToAllBridgeChainIdWithZeroAllBridgeChainId

Coverage and correctness verified from current file state. ✅


❌ Finding #2 — Still Open

testRevert_FailsToSetChainIdToAllBridgeChainIdIfNotInitialized (and the Unset equivalent) still use the fragile vm.startPrank(address(0)) pattern on a standalone TestAllBridgeFacet.

Current code:

function testRevert_FailsToSetChainIdToAllBridgeChainIdIfNotInitialized()
    public
{
    vm.startPrank(address(0));

    TestAllBridgeFacet uninitializedFacet = new TestAllBridgeFacet(
        ALLBRIDGE_ROUTER
    );
    // ... calls setChainIdToAllBridgeChainId
    // expects NotInitialized

The commit ca77b1d additionally introduced testRevert_InitAllBridgeWithZeroChainId and testRevert_InitAllBridgeWithZeroAllBridgeChainId which also use this same pattern — the approach was extended rather than fixed.

The tests are functionally correct today (fresh diamond storage has contractOwner = address(0), so pranking as address(0) bypasses LibDiamond.enforceIsContractOwner() and the NotInitialized guard fires as intended). However the correctness is sensitive to LibDiamond's default contractOwner value; any future change that initialises the owner to a non-zero value would cause the test to fail at the access-control check rather than the intended revert path.

The suggested fix (from the original review) is to use a properly constructed diamond — as test_InitAllBridge already does with createDiamond(USER_DIAMOND_OWNER, USER_PAUSER):

// Suggested replacement pattern:
function testRevert_FailsToSetChainIdToAllBridgeChainIdIfNotInitialized() public {
    LiFiDiamond testDiamond = createDiamond(USER_DIAMOND_OWNER, USER_PAUSER);
    // add facet without calling initAllBridge
    // ...
    vm.startPrank(USER_DIAMOND_OWNER);
    vm.expectRevert(NotInitialized.selector);
    AllBridgeFacet(address(testDiamond)).setChainIdToAllBridgeChainId(chainIdConfigs);
    vm.stopPrank();
}

To resolve: Either apply this pattern to the two IfNotInitialized revert tests (and ideally the new zero-field tests too), or post an explicit acceptance comment explaining why the address(0) approach is preferred and why the fragility is acceptable here.


❌ Finding #3 — Still Open

No test for initAllBridge re-initialization semantics was added.

The NatSpec documents: "Re-initialization overwrites the provided mappings and leaves the rest untouched." This is a non-trivial semantic — a second call with a subset of mappings updates those specific entries while leaving other mappings intact (it is NOT a full reset). No test verifies this.

The 4 tests added in ca77b1d all cover zero-field validation; none cover re-init.

To resolve: Add a test that:

  1. Calls initAllBridge with configs A+B
  2. Calls initAllBridge again with only config B (different value)
  3. Asserts: B's entry updated, A's entry preserved (not zeroed)

Or post an explicit acceptance comment if the team prefers to rely on the NatSpec documentation alone.


⚠️ Finding #4 — Advisory (no code change required)

The requires-types GitHub label is still on the PR. This signals that downstream TypeScript/ABI types need to be regenerated after merge (the new initAllBridge, setChainIdToAllBridgeChainId, unsetChainIdToAllBridgeChainId selectors and _getAllBridgeChainId now being view rather than pure all affect the generated ABI surface). This is a merge-time process step, not a code change. No action needed before approval — flagging for awareness only.


📋 Verdict: Needs Work

1 of 4 findings resolved. 2 findings remain open (both Low). 1 advisory noted.

Both open items are Low severity and do not affect correctness or security of AllBridgeFacet. However, each requires either a code fix or an explicit acceptance comment with justification before this review can be closed.

Note: SC core dev approval (gvladika) is already present. Once these two QA items are addressed, this PR is ready for merge pending audit completion (AuditRequired label remains — production cut must wait for audit/auditLog.json update and AuditCompleted label).


QA Agent (re-review) — 2026-07-17

@lifi-qa-agent lifi-qa-agent 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.

Requesting changes on 4 items — each requires either a code fix or an explicit acceptance comment with justification before this review is considered complete.

# Severity Type Issue / File
1 🟢 Low Security initAllBridge / setChainIdToAllBridgeChainId accept allBridgeChainId = 0, silently producing an unmapped entry
2 🟢 Low Test gap src/Facets/AllBridgeFacet.sol — fragile vm.startPrank(address(0)) owner hack in NotInitialized tests
3 🟢 Low Test gap test/solidity/Facets/AllBridgeFacet.t.sol — no test for initAllBridge re-initialization (partial-overlap semantics)
4 🟢 Low Process requires-types label — confirm ABI type regeneration step is in merge checklist

1. [Low] allBridgeChainId = 0 not validated in setters
Neither initAllBridge nor setChainIdToAllBridgeChainId guards against allBridgeChainId == 0 in the loop body. A zero value is indistinguishable from an unmapped entry: _getAllBridgeChainId would revert UnsupportedAllBridgeChainId, silently deleting the chain without emitting ChainIdToAllBridgeChainIdUnset. The off-chain proposeAllBridgeChainIdMappings.ts script validates > 0, but there is no on-chain guard. Add if (allBridgeChainId == 0) revert InvalidConfig(); inside both loops.
File: src/Facets/AllBridgeFacet.sol

2. [Low] Test gap — fragile address(0) owner in NotInitialized tests
testRevert_FailsToSetChainIdToAllBridgeChainIdIfNotInitialized and its unset counterpart prank as address(0) to pass LibDiamond.enforceIsContractOwner() on a freshly deployed standalone facet (where diamond contractOwner defaults to zero). The test reaches and asserts NotInitialized correctly, but the setup is fragile: if LibDiamond ever initialises contractOwner to a non-zero default, these tests break at the wrong revert. Replace with a properly constructed diamond that has a real owner, call the setter without first calling initAllBridge.
File: test/solidity/Facets/AllBridgeFacet.t.sol

3. [Low] Test gap — initAllBridge re-initialization not tested
initAllBridge can be called multiple times by the owner; its NatSpec documents "Re-initialization overwrites the provided mappings and leaves the rest untouched." No test covers this: a call with a subset of mappings should overwrite those entries and leave the others unchanged. Add a test that calls initAllBridge twice with partially overlapping configs and asserts the merge semantics.
File: test/solidity/Facets/AllBridgeFacet.t.sol

4. [Low] Process — type regeneration for requires-types
The requires-types label signals that the ABI change (new external functions + pureview on _getAllBridgeChainId) requires downstream TypeScript/ABI type regeneration. Confirm this is handled in the merge process and remove the label once complete.

💡 Once you've addressed the items above, re-apply the "Agent Review Request" label to trigger an automated re-review.

… (EXSC-650)

Enforce the reserved-zero sentinel in initAllBridge and
setChainIdToAllBridgeChainId: a zero chainId or allBridgeChainId now reverts
InvalidConfig instead of silently writing a mapping that _getAllBridgeChainId
treats as unmapped. Adds init/set regression tests for both zero fields.

Addresses CodeRabbit review on PR #2075.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@lifi-qa-agent lifi-qa-agent 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.

Re-review of post-review commit ca77b1d — Finding #1 resolved; 2 of the original 4 items remain open.

# Severity Type Issue / File
2 🟢 Low Test quality test/solidity/Facets/AllBridgeFacet.t.sol — fragile address(0) owner pattern in NotInitialized revert tests
3 🟢 Low Test gap test/solidity/Facets/AllBridgeFacet.t.sol — no re-initialization test for initAllBridge

2. [Low] Test quality — fragile address(0) owner in NotInitialized revert tests

testRevert_FailsToSetChainIdToAllBridgeChainIdIfNotInitialized and testRevert_FailsToUnsetChainIdToAllBridgeChainIdIfNotInitialized both deploy a standalone TestAllBridgeFacet and prank as address(0) to satisfy LibDiamond.enforceIsContractOwner() (which works because fresh diamond storage defaults contractOwner to address(0)). The ca77b1d commit extended this same pattern to the two new zero-field tests. The tests are functionally correct today but will silently test the wrong revert if LibDiamond is ever updated to initialise contractOwner to a non-zero value. The recommended fix is to use a properly constructed diamond with createDiamond(USER_DIAMOND_OWNER, USER_PAUSER) (as test_InitAllBridge already does) and call the setter/unsetter without first calling initAllBridge. Alternatively, post an explicit acceptance comment explaining why the address(0) approach is preferred.

3. [Low] Test gap — no re-initialization test for initAllBridge

The NatSpec documents that a second initAllBridge call overwrites the provided mappings while leaving others untouched (partial overwrite, not a full reset). No test verifies this semantic. The 4 new tests in ca77b1d all cover zero-field validation, not re-init behaviour. Add a test that calls initAllBridge twice with overlapping configs and asserts that (a) the second call's entries take effect and (b) entries from the first call absent from the second call are preserved. Alternatively, post an explicit acceptance comment if the team prefers to rely on the NatSpec and code clarity alone.

💡 Once you've addressed the items above, re-apply the "Agent Review Request" label to trigger an automated re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AuditRequired requires-types Trigger Types Bindings CI (ABI/type generation for lifi-contract-types)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants