Skip to content

feat(blue-sdk): add Arc chain#746

Open
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/add-arc-blue-sdk
Open

feat(blue-sdk): add Arc chain#746
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/add-arc-blue-sdk

Conversation

@prd-carapulse
Copy link
Copy Markdown
Contributor

@prd-carapulse prd-carapulse Bot commented May 27, 2026

Summary

  • Adds Arc (ChainId.ArcMainnet = 5042) metadata to @morpho-org/blue-sdk.
  • Adds Arc Morpho, Bundler3, Oracle, Vault V2, RegistryList, Permit2, and native-token addresses from morpho-org/deployments PR build(deps-dev): bump @apollo/client from 3.11.8 to 3.12.3 #205.
  • Adds deployment block lower bounds from Arc RPC code-history checks and test coverage for metadata/address exposure.
  • Adds changeset entries for @morpho-org/blue-sdk plus maintained direct dependents.

Sources

Notes

  • Arc WNative comes from deployments as 0x0000000000000000000000000000000000000001; it has no runtime code at latest, so its deployment lower bound is 0n and it is mapped to the SDK native-token sentinel.
  • Permit2 code is present from block 0n on Arc.

Request Context

Verification

  • npx pnpm@11.1.1 vitest run --project blue-sdk packages/blue-sdk/src/chain.test.ts packages/blue-sdk/src/addresses.test.ts
  • npx pnpm@11.1.1 biome check packages/blue-sdk/src/chain.ts packages/blue-sdk/src/addresses.ts packages/blue-sdk/src/chain.test.ts packages/blue-sdk/src/addresses.test.ts
  • npx pnpm@11.1.1 lint:address
  • npx pnpm@11.1.1 --filter @morpho-org/blue-sdk build
  • npx pnpm@11.1.1 --filter @morpho-org/morpho-sdk build
  • npx pnpm@11.1.1 --filter @morpho-org/evm-simulation build
  • npx pnpm@11.1.1 --filter @morpho-org/wdk-protocol-lending-morpho-evm run check:vault-v2
  • npx pnpm@11.1.1 changeset status --since origin/main

View Slack thread

Add Arc chain support to blue-sdk from morpho-org/deployments PR #205.

Sources:
- deployments PR: morpho-org/deployments#205
- example SDK PR: #720

Local verification:
- npx pnpm@11.1.1 vitest run --project blue-sdk packages/blue-sdk/src/chain.test.ts packages/blue-sdk/src/addresses.test.ts
- npx pnpm@11.1.1 biome check packages/blue-sdk/src/chain.ts packages/blue-sdk/src/addresses.ts packages/blue-sdk/src/chain.test.ts packages/blue-sdk/src/addresses.test.ts
- npx pnpm@11.1.1 lint:address
- npx pnpm@11.1.1 --filter @morpho-org/blue-sdk build
- npx pnpm@11.1.1 --filter @morpho-org/morpho-sdk build
- npx pnpm@11.1.1 --filter @morpho-org/evm-simulation build
- npx pnpm@11.1.1 --filter @morpho-org/wdk-protocol-lending-morpho-evm run check:vault-v2
- npx pnpm@11.1.1 changeset status --since origin/main
@prd-carapulse prd-carapulse Bot requested a review from a team as a code owner May 27, 2026 16:09
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f20503582f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

FlareMainnet = 14,
XdcMainnet = 50,
KaiaMainnet = 8217,
ArcMainnet = 5042,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add Arc to exhaustive ChainId consumers

Adding ChainId.ArcMainnet expands the enum for every workspace package that imports it, but repo-wide search shows packages/liquidation-sdk-viem/src/addresses.ts:58 still declares midasConfigs: Record<ChainId, ...> without a [ChainId.ArcMainnet] entry. That leaves the dependent package no longer type-checking against the workspace blue-sdk (and its Midas helpers would index midasConfigs[ChainId.ArcMainnet] as undefined if emitted), so the enum addition needs the same empty Arc entry/update in that consumer before this SDK release is coherent.

Useful? React with 👍 / 👎.

FlareMainnet = 14,
XdcMainnet = 50,
KaiaMainnet = 8217,
ArcMainnet = 5042,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Key Arc metadata to the documented chain ID

Arc's public RPC/wallet docs identify the live Arc Testnet as chain ID 5042002 and say mainnet parameters are not published yet, but this registers Arc under 5042 while also pointing metadata at https://testnet.arcscan.app. Consumers connected to the documented Arc network will pass 5042002 into getChainAddresses/ChainUtils and miss these deployments (or hit unsupported-chain paths), so the registry should be keyed to the actual network chain ID or withheld until Arc mainnet parameters exist.

Useful? React with 👍 / 👎.

registryList: "0xdEBC92370Cd74d55DA144116138681dbbb528765",
chainlinkOracleFactory: "0xbFc8D6167a02889D5EB08a023d9aB712B44f7dE8",
preLiquidationFactory: "0x8edf6Ac769a7E7D81d571aC0FB8733aD724f6922",
wNative: "0x0000000000000000000000000000000000000001",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not expose the non-ERC20 native sentinel as wNative

Arc's contract-address docs list the ERC-20 USDC interface at 0x3600000000000000000000000000000000000000 (https://docs.arc.network/arc/references/contract-addresses), while this wNative value is 0x000...001, which the commit notes say has no runtime code. SDK paths treat wNative as an ERC-20/wrapper address for approvals, balances, and native wrapping, so any Arc market/vault using native USDC will route those ERC-20 operations to an address with no token code instead of Arc's documented USDC interface.

Useful? React with 👍 / 👎.

name: "Arc",
id: ChainId.ArcMainnet,
nativeCurrency: { name: "USDC", symbol: "USDC", decimals: 18 },
explorerUrl: "https://testnet.arcscan.app",
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.

Suggested change
explorerUrl: "https://testnet.arcscan.app",
explorerUrl: "http://explorer.arc.io/",

registryList: "0xdEBC92370Cd74d55DA144116138681dbbb528765",
chainlinkOracleFactory: "0xbFc8D6167a02889D5EB08a023d9aB712B44f7dE8",
preLiquidationFactory: "0x8edf6Ac769a7E7D81d571aC0FB8733aD724f6922",
wNative: "0x0000000000000000000000000000000000000001",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

wNative is optional; it’s preferable to leave it empty.

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