Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy all contracts to unichain #992

Merged
merged 27 commits into from
Feb 17, 2025
Merged

Deploy all contracts to unichain #992

merged 27 commits into from
Feb 17, 2025

Conversation

0xDEnYO
Copy link
Contributor

@0xDEnYO 0xDEnYO commented Feb 12, 2025

Which Jira task belongs to this PR?

https://lifi.atlassian.net/browse/LF-12339

Why did I implement it this way?

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>

@0xDEnYO 0xDEnYO changed the title Deploy unichain lf 12305 Deploy unichain Feb 12, 2025
Copy link
Contributor

coderabbitai bot commented Feb 12, 2025

Walkthrough

This pull request introduces new configurations and updates to integrate support for the Unichain network—and, in some cases, the Berachain network—across multiple project components. Changes include adding new environment variables, updating JSON configuration files, deployment logs, and scripts with new network details, facets, and contract addresses. The modifications span CI workflows, configuration files, deployment logs, and helper scripts, ensuring that Unichain-specific parameters are propagated throughout the system.

Changes

File(s) Change Summary
.env.example, .github/…/diamondEmergencyPause.yml, foundry.toml Added new environment variables (ETH_NODE_URI_UNICHAIN, UNICHAIN_ETHERSCAN_API_KEY) and updated CI and RPC/Etherscan configurations for Unichain support.
config/across.json, config/amarok.json, config/dexs.json, config/global.json, config/networks.json, config/permit2Proxy.json, config/relay.json, config/stargate.json, config/tokenwrapper.json, networks Integrated new network sections and entries for Unichain (and Berachain), updating chain IDs, RPC URLs, facets, contract addresses, and other network-specific parameters across various configuration files.
deployments/_deployments_log_file.json, deployments/berachain.diamond.json, deployments/berachain.json, deployments/unichain.diamond.json, deployments/unichain.json Added comprehensive deployment log entries and JSON structures for Unichain and Berachain, incorporating new facets, peripheral components, version details, and contract addresses for LiFiDiamond deployments.
script/deploy/_targetState.json, script/deploy/deployPeripheryContracts.sh, script/deploy/facets/UpdateCoreFacets.s.sol, script/deploy/healthCheck.ts, script/helperFunctions.sh Updated deployment and helper scripts with new debug logging, integrated the EmergencyPauseFacet, refined facet filtering and error messages, and removed obsolete facet references.

Possibly related PRs

  • Deploy to Sonic #918: The changes in the main PR are related to the addition of the ETH_NODE_URI_UNICHAIN environment variable, which is also referenced in the retrieved PR's workflow file for pausing diamonds, indicating a direct connection at the code level.
  • Emergency pause improvements #829: The changes in the main PR, which add new environment variables related to Unichain, are directly related to the modifications in the retrieved PR that also involve the .github/workflows/diamondEmergencyPause.yml file, specifically the addition of the ETH_NODE_URI_UNICHAIN variable.
  • Deploy LIFI to Worldchain #861: The changes in the main PR are related to the addition of the ETH_NODE_URI_UNICHAIN environment variable, which is also modified in the retrieved PR to include a new variable ETH_NODE_URI_WORLDCHAIN, indicating a direct connection in the handling of environment variables for different blockchain networks.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c97f47 and cc548cb.

📒 Files selected for processing (1)
  • config/networks.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: enforce-min-test-coverage
  • GitHub Check: run-unit-tests
🔇 Additional comments (2)
config/networks.json (2)

661-661: Remove the trailing "?" in explorerApiUrl.

The explorerApiUrl still contains a trailing "?" which is inconsistent with other blockscout configurations in the file.

Apply this diff to fix the URL:

-    "explorerApiUrl": "https://unichain.blockscout.com/api?",
+    "explorerApiUrl": "https://unichain.blockscout.com/api",

650-667:

✅ Verification successful

Verify the unichain configuration endpoints and contracts.

Let's verify the key components of the unichain configuration:


🏁 Script executed:

#!/bin/bash
# Description: Verify unichain configuration.

# Test: Check if RPC endpoint is accessible and returns correct chain ID
echo "Checking RPC endpoint and chain ID..."
curl -s -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
  https://mainnet.unichain.org

# Test: Check if wrapped native token contract is deployed
echo -e "\nChecking wrapped native token contract..."
curl -s -X POST -H "Content-Type: application/json" \
  --data '{
    "jsonrpc":"2.0",
    "method":"eth_getCode",
    "params":["0x4200000000000000000000000000000000000006", "latest"],
    "id":1
  }' \
  https://mainnet.unichain.org

# Test: Check if multicall contract is deployed
echo -e "\nChecking multicall contract..."
curl -s -X POST -H "Content-Type: application/json" \
  --data '{
    "jsonrpc":"2.0",
    "method":"eth_getCode",
    "params":["0xcA11bde05977b3631167028862bE2a173976CA11", "latest"],
    "id":1
  }' \
  https://mainnet.unichain.org

# Test: Check if safe contract is deployed
echo -e "\nChecking safe contract..."
curl -s -X POST -H "Content-Type: application/json" \
  --data '{
    "jsonrpc":"2.0",
    "method":"eth_getCode",
    "params":["0x428653b7537717cA9B81b453601436D576081aF6", "latest"],
    "id":1
  }' \
  https://mainnet.unichain.org

Length of output: 15012


Verified Unichain Configuration Endpoints & Contracts

The configuration for Unichain has been verified with the following observations:

  • The RPC endpoint correctly returns a chain ID of 130 (0x82).
  • The wrapped native token contract at address 0x4200000000000000000000000000000000000006 is deployed and returns bytecode.
  • The multicall contract at address 0xcA11bde05977b3631167028862bE2a173976CA11 shows deployed contract code.
  • The Safe contract at address 0x428653b7537717cA9B81b453601436D576081aF6 is also deployed as expected.

No issues were identified with the endpoints or deployed contracts.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lifi-action-bot lifi-action-bot marked this pull request as draft February 12, 2025 09:52
@0xDEnYO 0xDEnYO changed the title Deploy unichain Deploy all contracts to unichain Feb 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 (3)
script/deploy/healthCheck.ts (1)

86-86: Consider using more specific facet filtering.

Changed from checking if keys end with 'Facet' to checking if they include 'Facet'. This could potentially match more strings than intended.

Consider using a more specific pattern:

-        k.includes('Facet')
+        k.endsWith('Facet') || k.includes('Facet/')
script/helperFunctions.sh (1)

1-3728: Consider enhancing security, error handling, and documentation.

While the current changes look good, here are some suggestions for future improvements:

  1. Security:

    • Consider adding input validation for network names and addresses
    • Add checks for malicious or unexpected input in deployment functions
    • Consider implementing a secure way to handle private keys
  2. Error Handling:

    • Add timeouts for network operations
    • Implement retries with exponential backoff for network calls
    • Add validation for environment variables before use
  3. Documentation:

    • Add detailed function documentation explaining parameters and return values
    • Document error codes and their meaning
    • Add examples for complex functions
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 15-15: GRAY appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 116-116: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 161-161: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 185-185: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 293-293: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 299-299: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 335-335: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 342-342: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 372-372: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 379-379: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 413-413: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 423-423: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 446-446: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 475-475: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 495-495: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 538-538: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 567-570: This is interpreted as a command name ending with space. Double check syntax.

(SC2288)


[warning] 578-578: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 614-614: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 672-672: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 693-693: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 698-698: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 728-728: Quote this to prevent word splitting.

(SC2046)


[warning] 764-764: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 797-797: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 800-800: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 805-805: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 908-908: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 944-944: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 971-971: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 987-987: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 997-997: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1017-1017: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1020-1020: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1020-1020: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 1023-1023: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1064-1064: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1117-1117: temp_file is referenced but not assigned.

(SC2154)


[warning] 1278-1278: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

(SC2319)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1352-1352: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1363-1363: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1368-1368: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1379-1379: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1458-1458: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

(SC2166)


[warning] 1544-1544: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1550-1550: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1560-1560: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1566-1566: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1619-1619: SELECTORS_LIST appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 1625-1625: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1632-1632: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1658-1658: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1661-1661: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1746-1746: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1753-1753: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1760-1760: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1847-1847: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1932-1932: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.

(SC2320)


[warning] 1954-1954: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1957-1957: DIAMOND_SUFFIX appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 1998-1998: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2020-2020: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2049-2049: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2070-2070: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2092-2092: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2095-2095: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2106-2106: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 2120-2120: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2121-2121: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2152-2152: Declare and assign separately to avoid masking return values.

(SC2155)


[error] 2212-2212: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).

(SC1087)


[warning] 2285-2285: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2285-2285: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2288-2288: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 2302-2302: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2302-2302: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2305-2305: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 2322-2322: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2322-2322: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2325-2325: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2325-2325: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2331-2331: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 2356-2356: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2357-2357: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2384-2384: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2387-2387: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2456-2456: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2461-2461: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2468-2468: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2482-2482: Declare and assign separately to avoid masking return values.

(SC2155)


[error] 2484-2484: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 2484-2484: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[warning] 2522-2522: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2526-2526: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2535-2535: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2546-2546: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2573-2573: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2600-2600: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2608-2608: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2671-2671: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2696-2696: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2725-2725: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2881-2881: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2916-2916: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2917-2917: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2918-2918: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2920-2920: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2923-2923: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2924-2924: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2928-2928: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2935-2935: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2936-2936: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 3022-3022: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3022-3022: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3025-3025: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3025-3025: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3033-3033: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3038-3038: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3039-3039: PRINTED appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 3114-3114: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3114-3114: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3117-3117: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3117-3117: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3124-3124: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3135-3135: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3247-3247: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3250-3250: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3300-3300: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3408-3408: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 3447-3447: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3476-3476: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3478-3478: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.

(SC2206)


[warning] 3501-3501: Declare and assign separately to avoid masking return values.

(SC2155)

deployments/_deployments_log_file.json (1)

786-786: Standardize SALT usage across networks.

The SALT field is consistently used in berachain deployments but left empty in unichain deployments. Consider standardizing the SALT usage across networks for better deployment traceability.

Also applies to: 831-831, 1564-1564, 1739-1739, 1831-1831, 1962-1962, 2341-2341, 2739-2739, 2832-2832, 2862-2862, 2895-2895

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 520e416 and 9b09cc3.

📒 Files selected for processing (30)
  • .env.example (2 hunks)
  • .github/workflows/diamondEmergencyPause.yml (1 hunks)
  • archive/test/LiFiDiamondImmutable.t.sol (1 hunks)
  • config/across.json (1 hunks)
  • config/amarok.json (3 hunks)
  • config/dexs.json (3 hunks)
  • config/global.json (2 hunks)
  • config/networks.json (2 hunks)
  • config/permit2Proxy.json (2 hunks)
  • config/relay.json (2 hunks)
  • config/stargate.json (6 hunks)
  • config/symbiosis.json (1 hunks)
  • config/tokenwrapper.json (2 hunks)
  • deployments/_deployments_log_file.json (27 hunks)
  • deployments/berachain.diamond.json (1 hunks)
  • deployments/berachain.json (1 hunks)
  • deployments/unichain.diamond.json (1 hunks)
  • deployments/unichain.json (1 hunks)
  • foundry.toml (5 hunks)
  • networks (2 hunks)
  • script/deploy/_targetState.json (7 hunks)
  • script/deploy/deployPeripheryContracts.sh (1 hunks)
  • script/deploy/facets/UpdateCoreFacets.s.sol (3 hunks)
  • script/deploy/healthCheck.ts (3 hunks)
  • script/helperFunctions.sh (1 hunks)
  • test/solidity/Facets/GasZipFacet.t.sol (1 hunks)
  • test/solidity/Facets/RelayFacet.t.sol (1 hunks)
  • test/solidity/Helpers/WithdrawablePeriphery.t.sol (1 hunks)
  • test/solidity/Periphery/GasZipPeriphery.t.sol (1 hunks)
  • test/solidity/Periphery/Permit2Proxy.t.sol (1 hunks)
✅ Files skipped from review due to trivial changes (9)
  • test/solidity/Periphery/Permit2Proxy.t.sol
  • archive/test/LiFiDiamondImmutable.t.sol
  • test/solidity/Facets/GasZipFacet.t.sol
  • test/solidity/Periphery/GasZipPeriphery.t.sol
  • test/solidity/Facets/RelayFacet.t.sol
  • networks
  • test/solidity/Helpers/WithdrawablePeriphery.t.sol
  • deployments/berachain.json
  • deployments/unichain.json
🧰 Additional context used
🧠 Learnings (2)
.github/workflows/diamondEmergencyPause.yml (1)
Learnt from: 0xDEnYO
PR: lifinance/contracts#894
File: .github/workflows/diamondEmergencyPause.yml:82-82
Timestamp: 2024-12-05T03:42:41.402Z
Learning: The `ETH_NODE_URI_WORLDCHAIN` secret is correctly configured in the GitHub repository.
config/dexs.json (1)
Learnt from: ezynda3
PR: lifinance/contracts#861
File: config/dexs.json:748-752
Timestamp: 2024-11-21T08:39:29.530Z
Learning: In the 'worldchain' network, the addresses `0x50D5a8aCFAe13Dceb217E9a071F6c6Bd5bDB4155`, `0x8f023b4193a6b18C227B4a755f8e28B3D30Ef9a1`, and `0x603a538477d44064eA5A5d8C345b4Ff6fca1142a` are used as DEXs and should be included in `config/dexs.json`.
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: enforce-min-test-coverage
  • GitHub Check: run-unit-tests
🔇 Additional comments (36)
script/deploy/facets/UpdateCoreFacets.s.sol (3)

14-14: LGTM! EmergencyPauseFacet import added.

The import statement is correctly placed and follows the established pattern.


51-54: LGTM! EmergencyPauseFacet address retrieval added.

The address retrieval for EmergencyPauseFacet follows the same pattern as other facets.


146-152: LGTM! EmergencyPauseFacet deployment logic added.

The deployment logic for EmergencyPauseFacet follows the established pattern, maintaining consistency with other facets.

script/deploy/healthCheck.ts (2)

267-268: LGTM! Updated comments to reflect new contract names.

Comments and references have been updated to use LiFiDEXAggregator consistently.

Also applies to: 282-282


34-36: Verify the order of periphery contracts.

The order of periphery contracts has been modified. Ensure that the order doesn't affect any dependent logic.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check if the order of periphery contracts is referenced elsewhere
rg -A 5 "corePeriphery.*=.*\[" --type ts

Length of output: 788


Order of Periphery Contracts Verified

The search confirms that the contracts defined in the corePeriphery array in script/deploy/healthCheck.ts are only iterated over to obtain contract data and verify registration. There is no indication that their order impacts any dependent logic.

config/permit2Proxy.json (1)

8-8: LGTM! Added Permit2 proxy addresses for new networks.

The standard Permit2 proxy address is correctly added for berachain and unichain networks.

Also applies to: 32-32

config/global.json (3)

4-4: LGTM! Added create3Factory addresses for new networks.

Network-specific create3Factory addresses are correctly added for berachain and unichain.

Also applies to: 8-9


49-52: LGTM! Updated periphery contract whitelist.

LiFiDEXAggregator has been added to the autoWhitelistPeripheryContracts list while maintaining existing entries.


54-66: Verify the coreFacets list organization.

The coreFacets list has been reorganized. Ensure that:

  1. All required facets are included
  2. There are no duplicate entries
  3. The order is maintained consistently across deployments
❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Check for facet references in deployment files
rg -A 5 "coreFacets.*=.*\[" --type json

Length of output: 41


I'm not seeing the expected output from the initial script. It appears the pattern used doesn’t match the JSON structure (which likely uses the syntax "coreFacets": [ ... ] rather than a pattern with = [) in the file. To move forward, please verify the organization of the coreFacets list manually or re-run a more tailored script. For example, you can use:

#!/bin/bash
# Display the coreFacets list from config/global.json for manual inspection
rg -A 10 '"coreFacets": \[' config/global.json

This should show you the list so you can check that:

  • All required facets are included.
  • There are no duplicates.
  • The ordering is consistent with your deployment expectations.

Since the initial command didn’t yield output and we need to double-check the list’s organization, please confirm manually once you run the above command.

Manual Review Required: Verify the coreFacets list organization in config/global.json.

  • Inspect the output to ensure all necessary facets are present.
  • Check that no facet appears more than once.
  • Ensure the order aligns with your deployment standards.
config/tokenwrapper.json (2)

5-5: Verify the berachain token wrapper address.

The address 0x6969696969696969696969696969696969696969 appears to be a placeholder. Please verify if this is the correct production address.


38-38: Verify the unichain token wrapper address.

The address 0x4200000000000000000000000000000000000006 is shared with other networks (optimism, mode, etc.). Please verify if this is the correct production address.

deployments/berachain.diamond.json (1)

61-69: Verify empty periphery component addresses.

The following periphery components have empty addresses:

  • GasZipPeriphery
  • LiFuelFeeCollector
  • ReceiverAcrossV3
  • ReceiverStargateV2
  • RelayerCelerIM

Please verify if these components are intentionally disabled for berachain or if the addresses need to be provided.

deployments/unichain.diamond.json (1)

65-72: Verify empty periphery component addresses.

The following periphery components have empty addresses:

  • GasZipPeriphery
  • LiFuelFeeCollector
  • ReceiverAcrossV3
  • ReceiverStargateV2
  • RelayerCelerIM

Please verify if these components are intentionally disabled for unichain or if the addresses need to be provided.

script/deploy/deployPeripheryContracts.sh (1)

32-32: LGTM!

The added debug logging for DIAMOND_CONTRACT_NAME enhances visibility during deployment and follows the existing debug logging pattern.

config/symbiosis.json (1)

22-25: Verify the reuse of metaRouter and gateway addresses.

The metaRouter address 0xcE8f24A58D85eD5c5A6824f7be1F8d4711A0eb4C and gateway address 0xAdB2d3b711Bb8d8Ea92ff70292c466140432c278 are shared with other networks (cronos, fraxtal, gravity, mode, sei). Please verify if this address reuse is intentional and secure for the berachain network.

.github/workflows/diamondEmergencyPause.yml (1)

85-85: LGTM!

The environment variable for Unichain is correctly configured and follows the same pattern as other networks.

config/relay.json (1)

17-21: Verify the chainIds and contract addresses.

The configurations follow the same pattern as other networks, but please verify:

  1. The chainIds (80094 for berachain, 130 for unichain) are correct for these networks
  2. The contract addresses are correctly deployed on these networks

Run the following script to verify the contract addresses:

Also applies to: 127-131

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Description: Verify that the contract addresses exist on the respective networks

# Test berachain addresses
echo "Verifying berachain addresses..."
curl -s -X POST "${ETH_NODE_URI_BERACHAIN}" \
-H "Content-Type: application/json" \
--data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0x7f4babd2c7d35221e72ab67ea72cba99573a0089\", \"latest\"],\"id\":1}"

# Test unichain addresses
echo "Verifying unichain addresses..."
curl -s -X POST "${ETH_NODE_URI_UNICHAIN}" \
-H "Content-Type: application/json" \
--data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0x47eb64e17a6d2fd559b608695e6d308cced918dd\", \"latest\"],\"id\":1}"

Length of output: 507


Action Required: Inconclusive Verification of Contract Addresses and Chain IDs

The script run did not actually verify the contract addresses because the environment variables (ETH_NODE_URI_BERACHAIN and ETH_NODE_URI_UNICHAIN) were empty, so no endpoint was contacted. As a result, the verification of the chainIds (80094 for berachain, 130 for unichain) and the deployed contract addresses could not be confirmed from the execution log.

  • Ensure the ETH_NODE_URI_BERACHAIN and ETH_NODE_URI_UNICHAIN environment variables are properly set with valid node endpoints before re-running the tests.
  • Re-run the script with valid endpoints to conclusively verify that the contract addresses are deployed on their respective networks.
config/across.json (1)

143-148: Verify the contract addresses and token configuration.

Please verify:

  1. The acrossSpokePool contract is correctly deployed at the specified address
  2. The WETH contract address is valid for Unichain (currently using the same address as Optimism)
  3. The tokensToApprove list includes all necessary tokens for this network

Run the following script to verify the contract addresses:

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Description: Verify that the contract addresses exist and are correctly configured

# Test acrossSpokePool contract
echo "Verifying acrossSpokePool contract..."
curl -s -X POST "${ETH_NODE_URI_UNICHAIN}" \
-H "Content-Type: application/json" \
--data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64\", \"latest\"],\"id\":1}"

# Test WETH contract
echo "Verifying WETH contract..."
curl -s -X POST "${ETH_NODE_URI_UNICHAIN}" \
-H "Content-Type: application/json" \
--data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0x4200000000000000000000000000000000000006\", \"latest\"],\"id\":1}"

Length of output: 507


Action: Re-run the verification with a valid ETH_NODE_URI_UNICHAIN

The current output shows that the curl requests were made against an empty node URI (""), so we couldn’t retrieve contract code for either the acrossSpokePool or the WETH contract. As a result, we can’t confirm:

  • That the acrossSpokePool contract is deployed at the specified address,
  • Whether the WETH address is correct for Unichain (currently matching Optimism), or
  • The tokensToApprove configuration is complete.

Please ensure that the ETH_NODE_URI_UNICHAIN environment variable is set to a valid endpoint and re-run the verification.

foundry.toml (3)

33-33: LGTM!

The RPC endpoint configurations for berachain and unichain follow the same pattern as other networks.

Also applies to: 66-66


3-4: Verify compatibility with updated versions.

The changes to solc_version (0.8.28) and evm_version (cancun) are significant updates. Please ensure:

  1. All contracts are compatible with Solidity 0.8.28
  2. All contracts use features supported by the Cancun EVM
✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Check for potential compatibility issues with the new versions

# Search for potential incompatibilities with Solidity 0.8.28
echo "Checking for potential incompatibilities with Solidity 0.8.28..."
ast-grep --pattern 'pragma solidity $v;' | grep -v '0.8.28'

# Search for potential EVM version specific features
echo "Checking for Cancun EVM specific features..."
rg -i 'mcopy|msize|tstore|tload|push0|blobhash|blobbasefee'

Length of output: 583


Compatibility Verification Complete

The repository code shows all Solidity files are using version 0.8.28, and the search for Cancun EVM-specific features only returned non-impactful comments. No incompatibilities were identified.


84-84: Verify Etherscan API configurations.

The Etherscan configurations use different API URLs and verifiers. Please verify:

  1. The API URLs are accessible and return valid responses
  2. The chain IDs match the network configurations
  3. The verifier type is correct for each network

Also applies to: 113-113

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify the Etherscan API configurations

# Test berachain API
echo "Testing berachain API..."
curl -s "https://api.routescan.io/v2/network/mainnet/evm/80094/etherscan/api?module=contract&action=getabi&address=0x0000000000000000000000000000000000000000"

# Test unichain API
echo "Testing unichain API..."
curl -s "https://unichain.blockscout.com/api?module=contract&action=getabi&address=0x0000000000000000000000000000000000000000"

Length of output: 557


Etherscan API configurations are functioning as expected.

  • Both the berachain and unichain endpoints are accessible and return responses.
  • The responses (i.e. “Contract source code not verified”) confirm that the endpoints are active and handling requests.
  • The chain ID used in the berachain URL (80094) is present as expected, and the response from the unichain endpoint is similar.

Based on these results, the API URLs, chain IDs, and verifier responses appear correctly configured.

config/amarok.json (2)

38-43: Verify berachain configuration.

The configuration follows the pattern of other networks with empty domains and token approvals. Please verify:

  1. The chainId 80094 is correct for berachain.
  2. Whether the zero address for connextHandler is intentional, as it suggests no Connext integration.

Run the following script to verify the chainId:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify berachain chainId and contract addresses.

# Test: Search for berachain chainId references. Expect: Consistent chainId.
rg -A 5 $'80094'

# Test: Search for berachain contract addresses. Expect: Consistent addresses.
rg -A 5 $'0x0000000000000000000000000000000000000000.*berachain'

Length of output: 2360


Berachain configuration verified.

Based on the search results:

  • The chainId 80094 is used consistently across the repository (in config/amarok.json, config/networks.json, foundry.toml, etc.), confirming its correctness.
  • The zero address for connextHandler appears intentionally set—likely as a placeholder indicating that Connext integration is not yet implemented.

No issues found.


295-300: Verify unichain configuration.

The configuration follows the pattern of other networks with empty domains and token approvals. Please verify:

  1. The chainId 130 is correct for unichain.
  2. Whether the zero address for connextHandler is intentional, as it suggests no Connext integration.

Run the following script to verify the chainId:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify unichain chainId and contract addresses.

# Test: Search for unichain chainId references. Expect: Consistent chainId.
rg -A 5 $'130'

# Test: Search for unichain contract addresses. Expect: Consistent addresses.
rg -A 5 $'0x0000000000000000000000000000000000000000.*unichain'

Length of output: 53323


Unichain configuration verified

  • The chainId 130 is consistently used (e.g., in config/amarok.json, config/networks.json, and foundry.toml), confirming it is correct.
  • The connextHandler is set to the zero address, which appears intentional—consistent with unichain having no Connext integration.
config/stargate.json (3)

216-216: Verify berachain zero addresses for composers and routers.

The configuration uses zero addresses for composers and routers. Please verify whether this is intentional, as it suggests these components are not yet deployed on berachain.

Also applies to: 265-265


253-253: Verify unichain zero addresses for composers and routers.

The configuration uses zero addresses for composers and routers. Please verify whether this is intentional, as it suggests these components are not yet deployed on unichain.

Also applies to: 295-295


10-10: Verify berachain contract addresses.

The configuration includes specific contract addresses for berachain. Please verify:

  1. The endpointV2 address 0x6F475642a6e85809B1c36Fa62763669b1b48DD5B is correct.
  2. The tokenMessaging address 0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6 is correct.

Run the following script to verify the contract addresses:

Also applies to: 52-52

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify berachain contract addresses.

# Test: Search for berachain contract addresses. Expect: Consistent addresses.
rg -A 5 $'0x6F475642a6e85809B1c36Fa62763669b1b48DD5B'
rg -A 5 $'0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6'

Length of output: 1563


Berachain addresses verified.

The search confirms that the endpointV2 address for berachain (0x6F475642a6e85809B1c36Fa62763669b1b48DD5B) appears as expected, and the tokenMessaging address (0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6) is present consistently as well. No inconsistencies were found based on the current file snapshot.

config/dexs.json (2)

199-203: Verify the berachain DEX addresses.

The berachain network has been added with 3 DEX addresses. Let's verify these addresses are valid and active on the berachain network.

Run the following script to verify the addresses:

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Description: Verify the berachain DEX addresses are valid and active.

# Test: Check if addresses are valid Ethereum addresses (40 hex chars)
for addr in "0x070EC43b4222E0f17EEcD2C839cb9D1D5adeF73c" "0xbf7d441A5015d92357bB41DB2552E11619D62326" "0x6295b30297C254108E0bF16C70D513d2043E3d45"; do
  if [[ ! $addr =~ ^0x[a-fA-F0-9]{40}$ ]]; then
    echo "Invalid address format: $addr"
  fi
done

Length of output: 674


Action: Verify Berachain DEX addresses for network activity

The provided script confirms that each address is a well-formed Ethereum address. However, it doesn't actually check if these addresses are "active" on the Berachain network. Since the network activity verification typically requires querying a Berachain RPC endpoint or using a blockchain explorer, please verify manually using the appropriate tools or API calls.


816-820: Verify the unichain DEX addresses.

The unichain network has been added with 3 DEX addresses. Let's verify these addresses are valid and active on the unichain network.

Run the following script to verify the addresses:

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Description: Verify the unichain DEX addresses are valid and active.

# Test: Check if addresses are valid Ethereum addresses (40 hex chars)
for addr in "0x8295805320853d6B28778fC8f5199327e62e3d87" "0x9679d1f7D955C81827c6842b3119B911943958eE" "0x86E5a407385364B86B3e502644EfFee1a43C9a7b"; do
  if [[ ! $addr =~ ^0x[a-fA-F0-9]{40}$ ]]; then
    echo "Invalid address format: $addr"
  fi
done

Length of output: 674


Unichain DEX Addresses Verification:

  • The shell script confirmed that all three addresses match the expected Ethereum address format.
  • However, the script only verifies the address format and does not check if these contracts are active on the Unichain network (e.g., by verifying deployed code or recent activity).
  • To fully verify that the addresses are active, additional on-chain checks (such as querying the network node with a JSON RPC call to use eth_getCode) are required.

Please proceed with network-level validation for activeness.

script/deploy/_targetState.json (3)

287-318: Verify the berachain facet configuration.

The berachain network has been added with standard facets. The configuration looks consistent with other networks, including the core facets and their versions.


1292-1320: Verify the unichain facet configuration.

The unichain network has been added with standard facets. However, I notice that the LiFuelFeeCollector facet is missing from the configuration while it's present in most other networks.

Please confirm if this omission is intentional or if the LiFuelFeeCollector facet should be added to maintain consistency with other networks.


1-1420: Verify version consistency across networks.

The facet versions have been updated consistently across all networks. Let's verify this consistency.

Run the following script to check version consistency:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Check version consistency of key facets across networks.

# Test: Extract and compare versions of key facets
jq -r 'to_entries[] | select(.value.production.LiFiDiamond | has("AccessManagerFacet")) | [.key, .value.production.LiFiDiamond.AccessManagerFacet] | @tsv' script/deploy/_targetState.json | sort | uniq -c
jq -r 'to_entries[] | select(.value.production.LiFiDiamond | has("CalldataVerificationFacet")) | [.key, .value.production.LiFiDiamond.CalldataVerificationFacet] | @tsv' script/deploy/_targetState.json | sort | uniq -c
jq -r 'to_entries[] | select(.value.production.LiFiDiamond | has("DexManagerFacet")) | [.key, .value.production.LiFiDiamond.DexManagerFacet] | @tsv' script/deploy/_targetState.json | sort | uniq -c
jq -r 'to_entries[] | select(.value.production.LiFiDiamond | has("EmergencyPauseFacet")) | [.key, .value.production.LiFiDiamond.EmergencyPauseFacet] | @tsv' script/deploy/_targetState.json | sort | uniq -c

Length of output: 4433


Facet version consistency verified across networks.

The script output confirms that key facets—such as AccessManagerFacet (1.0.0), CalldataVerificationFacet (1.2.0), DexManagerFacet (1.0.1), and EmergencyPauseFacet (1.0.1)—are uniformly updated in all production networks. No discrepancies were found.

script/helperFunctions.sh (2)

921-925: LGTM! Improved error message clarity for custom API keys.

The updated error message is more generic and clearer about custom API key requirements, which aligns well with the addition of new networks like Unichain.


1-3728: Verify network handling robustness.

Consider implementing these improvements for network operations:

  1. Network validation:

    • Add validation for supported network names
    • Verify network chain IDs before operations
    • Add checks for network availability
  2. RPC URL handling:

    • Implement fallback RPC URLs
    • Add health checks for RPC endpoints
    • Add retry logic for failed RPC calls

Run this script to verify network support:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify network configuration and RPC endpoints

# Check network configuration
echo "Checking network configuration..."
for network in $(cat ./networks); do
  # Check if network is properly configured
  rg -l "ETH_NODE_URI_$(echo $network | tr '[:lower:]' '[:upper:]')"

  # Check if network has chain ID
  rg -l "chainId.*$network" config/
done

Length of output: 8690


Network Handling Robustness Improvements

The network‐related logic is working but could be improved for greater resilience. Based on your verification script output, we see that all networks referenced in the “./networks” file have corresponding environment variables (e.g. ETH_NODE_URI_XXX) and chain ID references in the configuration files. To further improve robustness, consider the following refinements:

Network Validation:
 – Explicitly validate that each network name in the “./networks” file matches a supported list, and enforce proper formatting (e.g. lowercase names).
 – Verify the chain ID values at runtime and confirm connectivity to the expected network.

RPC URL Handling:
 – Implement fallback RPC URLs in case the primary endpoint fails or is unreachable (for example, a secondary URL can be tried automatically).
 – Add periodic health checks or retry logic for RPC calls to prevent disruptions during network operations.

Overall, while the current configuration files show appropriate references, adding these validations and fallback mechanisms will make network operations more resilient.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 15-15: GRAY appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 116-116: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 161-161: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 185-185: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 293-293: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 299-299: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 335-335: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 342-342: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 372-372: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 379-379: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 413-413: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 423-423: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 446-446: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 475-475: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 495-495: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 538-538: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 567-570: This is interpreted as a command name ending with space. Double check syntax.

(SC2288)


[warning] 578-578: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 614-614: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 672-672: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 693-693: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 698-698: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 728-728: Quote this to prevent word splitting.

(SC2046)


[warning] 764-764: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 797-797: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 800-800: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 805-805: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 908-908: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 944-944: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 971-971: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 987-987: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 997-997: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1017-1017: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1020-1020: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1020-1020: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 1023-1023: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1064-1064: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1117-1117: temp_file is referenced but not assigned.

(SC2154)


[warning] 1278-1278: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

(SC2319)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1305-1305: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1352-1352: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1363-1363: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1368-1368: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1379-1379: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1458-1458: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

(SC2166)


[warning] 1544-1544: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1550-1550: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1560-1560: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1566-1566: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1619-1619: SELECTORS_LIST appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 1625-1625: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1632-1632: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1658-1658: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 1661-1661: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1746-1746: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1753-1753: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1760-1760: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1847-1847: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 1932-1932: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.

(SC2320)


[warning] 1954-1954: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 1957-1957: DIAMOND_SUFFIX appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 1998-1998: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2020-2020: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2049-2049: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2070-2070: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2092-2092: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2095-2095: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2106-2106: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 2120-2120: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2121-2121: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2152-2152: Declare and assign separately to avoid masking return values.

(SC2155)


[error] 2212-2212: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).

(SC1087)


[warning] 2285-2285: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2285-2285: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2288-2288: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 2302-2302: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2302-2302: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2305-2305: Expanding an array without an index only gives the first element.

(SC2128)


[warning] 2322-2322: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2322-2322: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2325-2325: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2325-2325: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 2331-2331: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 2356-2356: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2357-2357: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2384-2384: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2387-2387: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2456-2456: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2461-2461: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2468-2468: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 2482-2482: Declare and assign separately to avoid masking return values.

(SC2155)


[error] 2484-2484: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 2484-2484: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[warning] 2522-2522: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2526-2526: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2535-2535: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2546-2546: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2573-2573: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2600-2600: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2608-2608: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2671-2671: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2696-2696: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2725-2725: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2881-2881: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2916-2916: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2917-2917: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2918-2918: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2920-2920: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2923-2923: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2924-2924: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2928-2928: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2935-2935: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2936-2936: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2948-2948: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 2978-2978: The surrounding quotes actually unquote this. Remove or escape them.

(SC2027)


[warning] 3022-3022: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3022-3022: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3025-3025: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3025-3025: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3033-3033: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3038-3038: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3039-3039: PRINTED appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 3114-3114: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3114-3114: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3117-3117: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3117-3117: Variable was used as an array but is now assigned a string.

(SC2178)


[warning] 3124-3124: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3135-3135: Use "${array[@]}" (with quotes) to prevent whitespace problems.

(SC2048)


[warning] 3247-3247: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3250-3250: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3300-3300: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3408-3408: Quote the right-hand side of == in [[ ]] to prevent glob matching.

(SC2053)


[warning] 3447-3447: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 3476-3476: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[warning] 3478-3478: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.

(SC2206)


[warning] 3501-3501: Declare and assign separately to avoid masking return values.

(SC2155)

deployments/_deployments_log_file.json (3)

12752-12758: Verify contract verification status on berachain.

Two contracts are marked as unverified on berachain:

  • Executor v2.1.0 at 0xf89Cc8190c911DB1AFd1f3B1ee711179b6867A23
  • GasZipFacet v1.0.2 at 0x6602DFf46cfFf22a24Ef3C4e68BAc2F4bcc83D0f

Please ensure these contracts are verified on the blockchain explorer for transparency and security.

Also applies to: 27679-27685


769-769: LGTM: Consistent optimizer settings.

All contracts use consistent optimizer settings with 1,000,000 runs, which is good for deployment gas optimization.

Also applies to: 783-783, 1547-1547, 1560-1560, 2323-2323, 2337-2337, 2721-2721, 2735-2735, 2777-2777, 2791-2791


14816-14816: Verify constructor arguments format.

The constructor arguments appear to be properly formatted with correct padding and parameter encoding. However, please verify that the encoded parameters match the expected contract constructors.

Run the following script to decode the constructor arguments:

Also applies to: 14830-14830, 25254-25255, 25847-25847, 25861-25861

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Description: Decode constructor arguments for contracts with complex parameters

# Search for contract interfaces to understand expected constructor parameters
ast-grep --pattern 'contract $_ {
  constructor($$$) {
    $$$
  }
}'

Length of output: 71


Please run the following updated shell script to search for Solidity contract constructor definitions using a simpler pattern. The initial ast-grep command returned no results, so this script will scan for any Solidity file lines containing the constructor( keyword. This should give us a better idea of the expected constructor formats in the codebase.

Once you execute this command, please share the output so we can verify whether the encoded constructor arguments in deployments/_deployments_log_file.json match the expected format in your contracts.


🏁 Script executed:

[run_scripts]
#!/bin/bash
# Search for constructor occurrences in Solidity files across the repository
rg 'constructor\s*\(' --type sol

Length of output: 184


Let's try a revised command that searches .sol files by their glob pattern instead of using an unrecognized file type flag. Please run the following shell script to search for constructor definitions in Solidity source files:

Once executed, please share the output so we can compare the found constructor formats with the encoded parameters in the deployment log.


🏁 Script executed:

[run_scripts]
#!/bin/bash
# Search for constructor occurrences in Solidity files using a glob pattern
rg 'constructor\s*\(' -g '*.sol'

Length of output: 18606


Action: Manually verify decoded constructor arguments against target contract’s constructor signature.

Our investigation showed that the encoded constructor arguments decode into four 32‐byte words that likely represent two addresses, a zero (or uint256 0), and a uint (e.g. 100000 in decimal). However, the automated searches across Solidity files returned many constructor definitions, and none were definitively matched to this exact argument structure.

• The hex string splits into four words:
  – Word1: an address (0x156cebba59deb2cb23742f70dcb0a11cc775591f)
  – Word2: all zero (likely a uint256 with value 0)
  – Word3: an address (0xf89cc8190c911db1afd1f3b1ee711179b6867a23)
  – Word4: a uint256 (0x186a0, which is 100000 in decimal)

• This suggests a constructor signature such as:
  constructor(address _first, uint256 _second, address _third, uint256 _fourth)

• Given the repository contains many contracts with various constructor signatures and our automated searches didn’t isolate the relevant one, manual verification is recommended to confirm that these decoded values match the intended contract’s constructor parameters.

Please review the target contract’s source code and deployment configuration to ensure the parameters are encoded as expected.

.env.example Outdated Show resolved Hide resolved
config/networks.json Outdated Show resolved Hide resolved
config/networks.json Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b09cc3 and fc3c280.

📒 Files selected for processing (15)
  • .env.example (2 hunks)
  • .github/workflows/diamondEmergencyPause.yml (1 hunks)
  • config/dexs.json (1 hunks)
  • config/global.json (2 hunks)
  • config/networks.json (1 hunks)
  • deployments/_deployments_log_file.json (23 hunks)
  • deployments/berachain.diamond.json (1 hunks)
  • deployments/berachain.json (1 hunks)
  • deployments/unichain.diamond.json (1 hunks)
  • deployments/unichain.json (1 hunks)
  • foundry.toml (2 hunks)
  • script/deploy/_targetState.json (39 hunks)
  • script/deploy/facets/UpdateCoreFacets.s.sol (3 hunks)
  • script/deploy/healthCheck.ts (3 hunks)
  • script/helperFunctions.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • .env.example
  • deployments/berachain.json
  • .github/workflows/diamondEmergencyPause.yml
  • foundry.toml
  • script/deploy/healthCheck.ts
  • config/dexs.json
  • script/helperFunctions.sh
  • config/global.json
  • config/networks.json
  • deployments/unichain.json
  • deployments/_deployments_log_file.json
🧰 Additional context used
🧠 Learnings (1)
script/deploy/_targetState.json (1)
Learnt from: mirooon
PR: lifinance/contracts#985
File: script/deploy/_targetState.json:0-0
Timestamp: 2025-02-12T09:44:12.961Z
Learning: The bsca network intentionally maintains different facet versions between staging and production environments, specifically:
1. CalldataVerificationFacet: v1.1.1 in staging vs v1.1.2 in production
2. EmergencyPauseFacet: present only in production
3. Permit2Proxy: present only in production
🪛 Biome (1.9.4)
script/deploy/_targetState.json

[error] 150-150: The key RelayFacet was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 212-212: The key Permit2Proxy was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 329-329: The key ERC20Proxy was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 330-330: The key Executor was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 331-331: The key FeeCollector was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 332-332: The key Receiver was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 333-333: The key LiFuelFeeCollector was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 334-334: The key TokenWrapper was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 335-335: The key LiFiDEXAggregator was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 336-336: The key Permit2Proxy was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 450-450: The key Permit2Proxy was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1226-1226: The key ERC20Proxy was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1227-1227: The key Executor was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1228-1228: The key FeeCollector was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1229-1229: The key Receiver was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1230-1230: The key LiFuelFeeCollector was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1231-1231: The key TokenWrapper was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)


[error] 1232-1232: The key LiFiDEXAggregator was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

🔇 Additional comments (4)
script/deploy/facets/UpdateCoreFacets.s.sol (1)

11-11: LGTM! The EmergencyPauseFacet integration follows the established pattern.

The changes correctly integrate the EmergencyPauseFacet by:

  1. Importing the facet contract
  2. Retrieving its address from config
  3. Building the diamond cut using the same pattern as other facets

Also applies to: 49-52, 144-150

deployments/unichain.diamond.json (1)

65-73: Verify the empty periphery addresses.

The following periphery components have empty addresses:

  • GasZipPeriphery
  • LiFuelFeeCollector
  • ReceiverStargateV2
  • RelayerCelerIM

Please confirm if these components are intentionally not deployed on unichain.

deployments/berachain.diamond.json (1)

56-63: LGTM! The berachain configuration is complete.

The configuration includes all required facets with their addresses and versions, and the GasZipPeriphery address is properly set.

Also applies to: 69-69

script/deploy/_targetState.json (1)

1386-1414: Verify version consistency for unichain facets.

The unichain configuration uses the following versions:

  • AccessManagerFacet: 1.0.0
  • CalldataVerificationFacet: 1.2.0
  • EmergencyPauseFacet: 1.0.1

Please verify these versions align with the intended deployment strategy, considering the learning that different networks may intentionally maintain different versions.

Run this script to check version consistency:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Compare facet versions across networks
jq -r '.[] | select(.production != null) | .production.LiFiDiamond | {
  AccessManagerFacet,
  CalldataVerificationFacet,
  EmergencyPauseFacet
}' script/deploy/_targetState.json

Length of output: 4800


Unichain facet versions are consistent across all production entries.
We verified that all production configuration entries for unichain’s LiFiDiamond facets consistently use:

  • AccessManagerFacet: 1.0.0
  • CalldataVerificationFacet: 1.2.0
  • EmergencyPauseFacet: 1.0.1

While the learning notes differences for the bsca network (with a production CalldataVerificationFacet of 1.1.2), this distinction does not affect the unichain configuration. The output confirms that the unichain facets are deployed with the intended consistent versions.

script/deploy/_targetState.json Show resolved Hide resolved
0xDEnYO and others added 3 commits February 13, 2025 10:02
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@0xDEnYO 0xDEnYO marked this pull request as ready for review February 13, 2025 03:05
@0xDEnYO 0xDEnYO enabled auto-merge (squash) February 13, 2025 03:05
@lifi-action-bot
Copy link
Collaborator

Test Coverage Report

Line Coverage: 78.66% (2238 / 2845 lines)
Function Coverage: 84.71% ( 388 / 458 functions)
Branch Coverage: 39.60% ( 221 / 558 branches)
Test coverage (78.66%) is above min threshold (78%). Check passed.

foundry.toml Show resolved Hide resolved
script/deploy/healthCheck.ts Outdated Show resolved Hide resolved
script/deploy/healthCheck.ts Show resolved Hide resolved
mirooon
mirooon previously approved these changes Feb 13, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5fc6783 and 3c97f47.

📒 Files selected for processing (1)
  • config/networks.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: run-unit-tests
  • GitHub Check: enforce-min-test-coverage
  • GitHub Check: generate-tag

config/networks.json Outdated Show resolved Hide resolved
config/networks.json Outdated Show resolved Hide resolved
ezynda3
ezynda3 previously approved these changes Feb 13, 2025
@0xDEnYO 0xDEnYO merged commit 03b9439 into main Feb 17, 2025
20 of 22 checks passed
@0xDEnYO 0xDEnYO deleted the deploy-unichain-lf-12305 branch February 17, 2025 08:12
@coderabbitai coderabbitai bot mentioned this pull request Feb 17, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants