Skip to content

Chains#434

Merged
arthcp merged 9 commits intomasterfrom
chains
Mar 10, 2026
Merged

Chains#434
arthcp merged 9 commits intomasterfrom
chains

Conversation

@arthcp
Copy link
Contributor

@arthcp arthcp commented Mar 10, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for MEGAETH and ETHEREAL blockchain networks across the platform.
    • Introduced chain-specific fee collection and surcharge configuration system.
    • Added new admin scripts for gas analysis, execution time tracking, and transaction decoding.
  • Documentation

    • Added comprehensive guides for fee collection mechanisms, surcharge configuration, and project setup.
  • Configuration

    • Updated environment variables and RPC configurations for new network support.
    • Updated deployment records and production verification data.
    • Incremented version numbers for DEV and PROD deployments.
  • Refactoring

    • Improved type signatures for gas overrides and relay operations.
    • Enhanced S3 client configuration with improved timeout and retry handling.
  • Style

    • Applied code formatting improvements across admin scripts.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3023d367-14fd-44f5-a857-7ba1cb354608

📥 Commits

Reviewing files that changed from the base of the PR and between 88d6ea7 and 1752bb6.

📒 Files selected for processing (49)
  • .env.example
  • .prettierignore
  • CLAUDE.md
  • deployments/prod_addresses.json
  • deployments/prod_verification.json
  • docs/CHAIN_SPECIFIC_FEES.md
  • docs/FEE_COLLECTION.md
  • docs/S3_SURCHARGE_CONFIG.md
  • scripts/admin/decode-execute-calldata.ts
  • scripts/admin/get-gas-info.ts
  • scripts/admin/get-outbound-txs.ts
  • scripts/admin/get-seal-events.ts
  • scripts/admin/rescueFunds.ts
  • scripts/admin/send-attest.ts
  • scripts/admin/send-execute.ts
  • scripts/constants/overrides.ts
  • scripts/deploy/config/config.ts
  • scripts/deploy/helpers/send-msg/utils.ts
  • scripts/deploy/scripts/configureSocket.ts
  • scripts/deploy/utils/relayer.ts
  • scripts/deploy/utils/socket-signer.ts
  • scripts/get-execution-times.sh
  • scripts/native-bridge-helpers/arbitrum/l1Tol2Relay.ts
  • scripts/native-bridge-helpers/arbitrum/l2tol1Relay.ts
  • scripts/native-bridge-helpers/optimism/l1Tol2Relay.ts
  • scripts/native-bridge-helpers/optimism/l2tol1Relay.ts
  • scripts/native-bridge-helpers/optimism/op-stack-native-withdrawals.ts
  • scripts/native-bridge-helpers/polygon/l2tol1Relay.ts
  • scripts/rpcConfig/constants/batcherSupportedChainSlug.ts
  • scripts/rpcConfig/constants/explorers.ts
  • scripts/rpcConfig/constants/finality.ts
  • scripts/rpcConfig/constants/icons.ts
  • scripts/rpcConfig/constants/rpc.ts
  • scripts/rpcConfig/constants/version.ts
  • scripts/rpcConfig/rpcConfig.ts
  • scripts/rpcConfig/uploadS3Config.ts
  • src/enums/arbL3Chains.ts
  • src/enums/chainId.ts
  • src/enums/chainSlug.ts
  • src/enums/chainSlugToHardhatChainName.ts
  • src/enums/chainSlugToId.ts
  • src/enums/chainSlugToKey.ts
  • src/enums/currency.ts
  • src/enums/hardhatChainName.ts
  • src/enums/hardhatChainNameToSlug.ts
  • src/enums/mainnetIds.ts
  • src/enums/native-tokens.ts
  • src/enums/opStackChains.ts
  • src/socket-types.ts

Walkthrough

This PR adds support for two new blockchain networks (MEGAETH and ETHEREAL) by introducing chain enumerations, RPC configuration, and infrastructure files. It includes comprehensive documentation for fee collection mechanisms, new admin utility scripts, and updates to deployment verification records.

Changes

Cohort / File(s) Summary
Chain Enumeration & Slug Mapping
src/enums/chainId.ts, src/enums/chainSlug.ts, src/enums/hardhatChainName.ts, src/enums/chainSlugToId.ts, src/enums/chainSlugToHardhatChainName.ts, src/enums/hardhatChainNameToSlug.ts, src/enums/chainSlugToKey.ts
Added MEGAETH (4326) and ETHEREAL (5064014) enum members and created bidirectional slug-to-hardhat-name mappings for both chains.
Chain Configuration & Metadata
scripts/rpcConfig/constants/rpc.ts, scripts/rpcConfig/constants/explorers.ts, scripts/rpcConfig/constants/icons.ts, src/enums/currency.ts, src/enums/native-tokens.ts
Registered MEGAETH and ETHEREAL RPC endpoints, explorer URLs, and configured ETHEREAL to use ethena-usde native token; added "plasma" and "ethena-usde" token enums.
Chain Registry & Overrides
scripts/rpcConfig/constants/batcherSupportedChainSlug.ts, src/enums/mainnetIds.ts, src/enums/arbL3Chains.ts, src/enums/opStackChains.ts, scripts/rpcConfig/constants/finality.ts
Updated batcher-supported chains (removed 6 chains, added MEGAETH/ETHEREAL), added both chains to mainnet IDs, registered ETHEREAL as Arb L3, MEGAETH as OP Stack L2, and configured ZKEVM finality overrides.
Environment & Deployment Configuration
.env.example, deployments/prod_verification.json
Added MEGAETH_RPC and ETHEREAL_RPC environment variables; expanded deployment verification with 292 lines covering chain 4326 and 5064014 contract deployments across all Socket components.
Gas & Fee Configuration
scripts/constants/overrides.ts, scripts/deploy/config/config.ts
Updated return type signatures to use string for gasPrice/maxFeePerGas fields; adjusted GNOSIS gasLimit from 15M to 6M and MONAD from 3M to 5M with MEGAETH placeholders.
Admin & Utility Scripts
scripts/admin/decode-execute-calldata.ts, scripts/admin/get-gas-info.ts, scripts/admin/get-seal-events.ts, scripts/admin/get-outbound-txs.ts, scripts/get-execution-times.sh
Added new TypeScript utilities for decoding execution calldata, fetching gas metrics, and a Bash script for cross-chain execution time analysis with RPC integration.
Send & Relay Scripts
scripts/admin/send-execute.ts, scripts/deploy/helpers/send-msg/utils.ts, scripts/deploy/utils/relayer.ts, scripts/deploy/utils/socket-signer.ts
Refactored send-execute to discover source transactions via MessageOutbound events instead of explicit destination flags; added getStatus function to relayer for transaction status polling; updated relay URL construction to append "/relay" path.
Configuration & Safe Proxy
scripts/admin/rescueFunds.ts, scripts/rpcConfig/rpcConfig.ts, scripts/rpcConfig/uploadS3Config.ts
Tightened SocketSafeProxy eligibility to require batcher support; added parseChainSurchargeFromEnv to populate chainSurchargeUsdBySlug config from environment; enhanced S3Client with retry logic and timeout configuration.
Bridge & Cross-Chain Helpers
scripts/native-bridge-helpers/arbitrum/l1Tol2Relay.ts, scripts/native-bridge-helpers/arbitrum/l2tol1Relay.ts, scripts/native-bridge-helpers/optimism/..., scripts/native-bridge-helpers/polygon/l2tol1Relay.ts
Migrated Arbitrum bridges from Goerli to Sepolia; refactored all bridge helpers to resolve RPC URLs via hardhatChainNameToSlug mapping instead of direct chain IDs; appended "/relay" path to Polygon relay URLs.
Configuration & Formatting Updates
scripts/admin/send-attest.ts, scripts/deploy/scripts/configureSocket.ts, .prettierignore, scripts/rpcConfig/constants/version.ts
Reformatted send-attest multiline constructs without functional changes; removed early return in configureSocket to allow empty batch processing; changed prettierignore from specific deploy.sh to wildcard \*.sh; updated version numbers (DEV 1.0.5→1.0.6, PROD 1.0.113→1.0.131).
Documentation
CLAUDE.md, docs/FEE_COLLECTION.md, docs/CHAIN_SPECIFIC_FEES.md, docs/S3_SURCHARGE_CONFIG.md
Added comprehensive documentation covering CLAUDE project workflow, fee collection mechanisms (execution/transmission/switchboard), chain-specific USD surcharge configuration, and S3 surcharge setup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Bungee chains #419: Adds new chain support with parallel RPC/enum configuration and explorer mappings for additional blockchain networks.

Poem

🌐 Two new chains unfold, MEGAETH and ETHEREAL too,
Configuration cascades through enums, old and new.
Surcharges flow like rivers, gas metrics dance with precision,
Scripts discover pathways in a symphony of execution—
The network expands, unbounded and true. ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chains

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

@arthcp arthcp merged commit ade0b2c into master Mar 10, 2026
0 of 2 checks passed
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