Skip to content

feat(network): add Injective (chainId 1776)#2058

Open
0xDEnYO wants to merge 10 commits into
mainfrom
add-network-injective
Open

feat(network): add Injective (chainId 1776)#2058
0xDEnYO wants to merge 10 commits into
mainfrom
add-network-injective

Conversation

@0xDEnYO

@0xDEnYO 0xDEnYO commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Which Linear task belongs to this PR?

EXSC-630 — https://linear.app/lifi-linear/issue/EXSC-630/add-injective-chainid-1776-network-production-deploy

Why did I implement it this way?

Adds the Injective network (chainId 1776) — core network config only; bridge
integrations (Gas.zip, Polymer, Glacis, Intents) are intentionally deferred to follow-up PRs.

Source: chain-team Tally form submission. Every contract address was validated on-chain with
cast code against the public RPC (https://sentry.evm-rpc.injective.network, chainId confirmed 1776).

config/networks.json — new injective entry (inserted alphabetically), mirroring the
ink precedent (also blockscout, also Cancun-capable):

  • nativeCurrency INJ, nativeAddress 0x0…0 (form's "inj" → repo native-gas convention)
  • wrappedNativeAddress 0x0000000088827d2d103ee2d9a6b781773ae03ffb (WINJ) — ✅ code present
  • multicallAddress 0xcA11…CA11 — ✅ code present
  • verificationType blockscout, explorer https://blockscout.injective.network
    (chain is not on the Etherscan V2 chainlist → blockscout API + verifier)
  • deployedWithEvmVersion cancun / deployedWithSolcVersion 0.8.28 — the chain's stated
    max solc is 0.8.28, so we cap there rather than the repo default 0.8.29 (which would exceed it)
  • safeAddress "" and create3Factory "" — set once deployed on-chain; the form provided a
    Safe transaction-service URL, not our SC multisig contract address
  • gasZipChainId 0 — Gas.zip not yet available on Injective

foundry.tomlinjective RPC endpoint + blockscout verifier entry (chain 1776).

Intentional omissions (per the add-network rules, validated on-chain):

  • Permit2 0x0000…78BA3 has no code on Injective → not added to config/permit2Proxy.json
    (deployment will skip Permit2Proxy for this network). config/global.json untouched.
  • Gas.zip N/A → not added to config/gaszip.json. config/global.json untouched.

Deploy-time prerequisites (tracked separately, not part of this config PR):

  • Deployer + pauser wallets need funding in INJ (both currently empty on-chain).
  • ETH_NODE_URI_INJECTIVE must be added to MongoDB (bun add-network-rpc) then fetch-rpcs.
  • Production target state must be regenerated via scriptMaster.sh use case 10.

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>

Core network setup only (bridges deferred to follow-up PRs):
- config/networks.json: injective entry (blockscout, cancun/0.8.28)
- foundry.toml: RPC endpoint + blockscout verifier

Permit2 (no code on chain) and Gas.zip (N/A) intentionally omitted.

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

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@0xDEnYO, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b509639e-b9f0-475d-95ec-f42cc7824d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 2a06b93 and ca1f9e6.

📒 Files selected for processing (6)
  • config/permit2Proxy.json
  • config/stargateV2.json
  • config/whitelist.json
  • deployments/injective.diamond.json
  • deployments/injective.json
  • script/deploy/_targetState.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-network-injective

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.

@0xDEnYO
0xDEnYO marked this pull request as ready for review July 15, 2026 09:13
@github-actions github-actions Bot added the requires-types Trigger Types Bindings CI (ABI/type generation for lifi-contract-types) label Jul 15, 2026
Generated via scriptMaster use case 10 (parseTargetStateGoogleSpreadsheet
production injective) from the production target-state Google Sheet.

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

lifi-action-bot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Test Coverage Report

Line Coverage: 90.22% (3343 / 3705 lines)
Function Coverage: 93.56% ( 509 / 544 functions)
Branch Coverage: 75.20% ( 649 / 863 branches)
Test coverage (90.22%) is above min threshold (89%). Check passed.

0xDEnYO and others added 3 commits July 15, 2026 17:59
…get state

- networks.json / foundry.toml: verifier API is on blockscout-api.injective.network
  (separate subdomain), not the explorer UI domain — fixes contract verification.
- networks.json: record deployed CREATE3Factory + Safe addresses.
- _targetState.json: re-parsed after the production sheet was updated to current
  versions (ERC20Proxy 1.2.0, LiFiIntentEscrowFacet 1.1.2) so the new network gets
  current code and the Executor is pre-authorized at deploy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Production deployment artifacts for the Injective core bring-up (stages 1-10):
CREATE3Factory, Safe, LiFiDiamond, 12 core facets, and periphery (ERC20Proxy
1.2.0 with Executor pre-authorized, Executor, FeeForwarder, TokenWrapper), plus
the whitelist sync recording FeeForwarder/TokenWrapper selector pairs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FeeCollector is deprecated but was still listed in global.json corePeriphery,
so healthCheck.ts flagged it "not deployed" on every new chain (and Tron core
deploy would still deploy it). Removing it from the list; the standalone
FeeCollector config block is left for a fuller deprecation pass.

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: 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 `@script/deploy/_targetState.json`:
- Around line 2529-2544: Remove GasZipFacet, GasZipPeriphery, and Permit2Proxy
from the target state because their configurations are intentionally omitted and
unavailable on Injective. Verify the deferred Intents scope and remove
LiFiIntentEscrowFacet as well unless it is explicitly intended to deploy
independently of its peripheral integrations.
🪄 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: 46494cc7-3436-4552-9114-a0e9355107fa

📥 Commits

Reviewing files that changed from the base of the PR and between f5b88ca and 2a06b93.

📒 Files selected for processing (7)
  • config/global.json
  • config/networks.json
  • config/whitelist.json
  • deployments/injective.diamond.json
  • deployments/injective.json
  • foundry.toml
  • script/deploy/_targetState.json
💤 Files with no reviewable changes (1)
  • config/global.json

Comment thread script/deploy/_targetState.json Outdated
Comment on lines +2529 to +2544
"GasZipFacet": "2.0.5",
"GenericSwapFacet": "1.0.0",
"GenericSwapFacetV3": "2.0.0",
"LiFiIntentEscrowFacet": "1.1.2",
"LiFiTimelockController": "1.0.1",
"OwnershipFacet": "1.0.0",
"PeripheryRegistryFacet": "1.0.0",
"WhitelistManagerFacet": "1.1.0",
"WithdrawFacet": "1.0.0",
"LiFiDiamond": "1.0.0",
"ERC20Proxy": "1.2.0",
"Executor": "2.1.0",
"FeeForwarder": "1.0.0",
"GasZipPeriphery": "1.0.2",
"TokenWrapper": "1.2.1",
"Permit2Proxy": "1.0.4"

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove omitted components from target state.

The PR summary states that Permit2 and Gas.zip configurations are intentionally omitted because Permit2 has no deployed code on Injective and Gas.zip is unavailable. However, GasZipFacet, GasZipPeriphery, and Permit2Proxy are included in this target state block. Leaving them here will likely cause the deployment pipeline to erroneously attempt to deploy or verify them.

Additionally, since the summary mentions that Intents are deferred, please verify if LiFiIntentEscrowFacet should also be removed from the target state or if the facet itself is still intended to be deployed without its full peripheral integrations.

♻️ Proposed fix
-        "GasZipFacet": "2.0.5",
         "GenericSwapFacet": "1.0.0",
         "GenericSwapFacetV3": "2.0.0",
         "LiFiIntentEscrowFacet": "1.1.2",
         "LiFiTimelockController": "1.0.1",
         "OwnershipFacet": "1.0.0",
         "PeripheryRegistryFacet": "1.0.0",
         "WhitelistManagerFacet": "1.1.0",
         "WithdrawFacet": "1.0.0",
         "LiFiDiamond": "1.0.0",
         "ERC20Proxy": "1.2.0",
         "Executor": "2.1.0",
         "FeeForwarder": "1.0.0",
-        "GasZipPeriphery": "1.0.2",
-        "TokenWrapper": "1.2.1",
-        "Permit2Proxy": "1.0.4"
+        "TokenWrapper": "1.2.1"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"GasZipFacet": "2.0.5",
"GenericSwapFacet": "1.0.0",
"GenericSwapFacetV3": "2.0.0",
"LiFiIntentEscrowFacet": "1.1.2",
"LiFiTimelockController": "1.0.1",
"OwnershipFacet": "1.0.0",
"PeripheryRegistryFacet": "1.0.0",
"WhitelistManagerFacet": "1.1.0",
"WithdrawFacet": "1.0.0",
"LiFiDiamond": "1.0.0",
"ERC20Proxy": "1.2.0",
"Executor": "2.1.0",
"FeeForwarder": "1.0.0",
"GasZipPeriphery": "1.0.2",
"TokenWrapper": "1.2.1",
"Permit2Proxy": "1.0.4"
"GenericSwapFacet": "1.0.0",
"GenericSwapFacetV3": "2.0.0",
"LiFiIntentEscrowFacet": "1.1.2",
"LiFiTimelockController": "1.0.1",
"OwnershipFacet": "1.0.0",
"PeripheryRegistryFacet": "1.0.0",
"WhitelistManagerFacet": "1.1.0",
"WithdrawFacet": "1.0.0",
"LiFiDiamond": "1.0.0",
"ERC20Proxy": "1.2.0",
"Executor": "2.1.0",
"FeeForwarder": "1.0.0",
"TokenWrapper": "1.2.1"
🤖 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/deploy/_targetState.json` around lines 2529 - 2544, Remove
GasZipFacet, GasZipPeriphery, and Permit2Proxy from the target state because
their configurations are intentionally omitted and unavailable on Injective.
Verify the deferred Intents scope and remove LiFiIntentEscrowFacet as well
unless it is explicitly intended to deploy independently of its peripheral
integrations.

0xDEnYO and others added 5 commits July 16, 2026 09:31
Local deployment-log cache was stale vs the MongoDB master log; synced it so the
committed logs reflect all 19 deployed+verified contracts, including OutputValidator
(0x1299f7F941745377a2091AF51557e8De04B96B10) — deployed via corePeriphery and
registered in the diamond, but missing from the stale local cache the stage-11
health check had read.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Re-ran the whitelist sync after OutputValidator was confirmed deployed+registered;
closes the address-consistency whitelist coverage gap (registered periphery must be
covered in config/whitelist.json).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
OutputValidator (corePeriphery) was missing from the sheet; added it, re-parsed
the target state so the health check tracks it as expected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add Injective (chainId 1776) to config/permit2Proxy.json (canonical Permit2
0x000000000022D473030F116dDEE9F6B43aC78BA3) and deploy Permit2Proxy v1.0.4 to
the Injective LiFiDiamond, registered via diamondUpdatePeriphery.

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

Configure Stargate V2 on Injective (chainId 1776) and deploy the facet + receiver:
- config/stargateV2.json: endpointV2 0x6F475642a6e85809B1c36Fa62763669b1b48DD5B
  (LayerZero EndpointV2, from TokenMessaging.endpoint()) and tokenMessaging
  0xAf368c91793CB22739386DFCbBb2F1A9e4bCBeBf (Stargate official injectiveevm-mainnet)
- StargateFacetV2 v1.0.1 -> 0x2bE73b7851482428F28c8D0206667dFC74312400 (diamondCut)
- ReceiverStargateV2 v1.1.0 -> 0x360cAEBad9699A334DFE5465eaDB8D0730a9a3c6 (diamondUpdatePeriphery)
- add both to injective production target state

Enables Stargate ETH/WETH routes (Stargate deploys StargateOFTETH on Injective).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants