Skip to content

Conversation

@ezynda3
Copy link
Contributor

@ezynda3 ezynda3 commented Jul 23, 2025

Which Jira task belongs to this PR?

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>

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 23, 2025

## Walkthrough

This change introduces comprehensive improvements to Safe transaction decoding, formatting, and display logic. It adds new utility modules and tests for decoding transaction calldata, extracting and formatting timelock and diamondCut details, and displaying Safe transaction metadata. The workflow and documentation are updated to support and enforce TypeScript testing using Bun. Several fixtures and test files are added, and some redundant decoding logic is removed.

## Changes

| File(s)                                                                                           | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| .github/workflows/test.yml, package.json, tsconfig.json, conventions.md                         | Added TypeScript test script and workflow integration; updated TypeScript config for Bun; documented TypeScript test conventions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| .husky/pre-commit                                                                                | Excluded new fixture path from pre-commit secret scanning.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| script/deploy/safe/confirm-safe-tx-utils.ts                                                    | Added new utility module for extracting, decoding, and formatting Safe transaction, timelock, and nested call details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| script/deploy/safe/confirm-safe-tx.test.ts                                                     | Added comprehensive unit tests for Safe transaction confirmation utility functions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| script/deploy/safe/confirm-safe-tx.ts                                                          | Refactored and enhanced transaction decoding, error handling, and display logic; improved type safety and formatting; updated function signatures.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| script/deploy/safe/safe-decode-utils.ts                                                        | Major refactor: implemented layered, recursive, and multi-source decoding of Safe transaction calldata; added robust error handling and support for nested calls.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| script/deploy/safe/safe-decode-utils.test.ts                                                   | Added test suite for transaction data decoding utilities, covering known, unknown, and nested transaction scenarios.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| script/deploy/safe/fixtures/deployment-log.json, script/deploy/safe/fixtures/sample-transactions.ts | Added JSON and TypeScript fixture files with deployment addresses and sample transaction calldata for testing and decoding.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| script/deploy/safe/safe-utils.ts                                                               | Removed obsolete async function for transaction data decoding (now superseded by new decoding utilities); changed some interfaces to internal; reformatted retry function; removed unused network processing function.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## Estimated code review effort

🎯 4 (Complex) | ⏱️ ~90 minutes

## Possibly related PRs

- lifinance/contracts#1039: Both PRs refactor the `processTxs` function in `confirm-safe-tx.ts`, changing its signature and moving MongoDB fetching logic outside, improving type safety and modularity.
- lifinance/contracts#1104: Both PRs modify Safe deployment scripts; this PR adds TypeScript testing and decoding utilities, while the other adds Ledger hardware wallet support and signing improvements.
- lifinance/contracts#1050: Both PRs modify `script/deploy/safe/confirm-safe-tx.ts` and related scripts, focusing on Safe transaction confirmation logic. The retrieved PR removes Safe SDK dependencies and switches to Bun, while this PR adds detailed decoding and formatting utilities.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @typescript-eslint/[email protected]
npm error node_modules/@typescript-eslint/parser
npm error dev @typescript-eslint/parser@"^7.10.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm error node_modules/@typescript-eslint/eslint-plugin
npm error dev @typescript-eslint/eslint-plugin@"^5.16.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /.npm/_logs/2025-07-24T07_39_50_813Z-eresolve-report.txt
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-24T07_39_50_813Z-debug-0.log

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

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 32ff5ee and 1cea39f.

📒 Files selected for processing (2)
  • script/deploy/safe/confirm-safe-tx-utils.ts (1 hunks)
  • script/deploy/safe/confirm-safe-tx.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • script/deploy/safe/confirm-safe-tx.test.ts
  • script/deploy/safe/confirm-safe-tx-utils.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: run-unit-tests
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/safe-tx-decoding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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.

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

♻️ Duplicate comments (1)
script/deploy/safe/confirm-safe-tx.test.ts (1)

7-8: Remove unnecessary eslint-disable comment.

🧹 Nitpick comments (8)
package.json (1)

89-90: Simplify the test:ts script to leverage Bun’s built-in test runner
Running bun test once per file loses aggregated reporting and is slower. A single invocation will auto-discover all *.test.ts files.

-    "test:ts": "find script -name '*.test.ts' -type f -exec bun test {} +",
+    "test:ts": "bun test",

This keeps the command cross-platform and lets Bun handle globbing/parallelism.

script/deploy/safe/safe-decode-utils.test.ts (2)

7-8: Remove unnecessary eslint-disable comment.

The eslint-disable comment for 'import/no-unresolved' appears unnecessary since Bun's test imports should be properly configured in the ESLint setup.

-// eslint-disable-next-line import/no-unresolved
 import { describe, test, expect, beforeAll } from 'bun:test'

140-140: Use optional chaining for cleaner code.

-      if (gasZipFacetCut && gasZipFacetCut.facetAddress) {
+      if (gasZipFacetCut?.facetAddress) {
script/deploy/safe/safe-decode-utils.ts (3)

71-71: Consider making paths more robust.

The hardcoded paths using __dirname might not work correctly in all environments (e.g., when bundled or run from different directories). Consider using a more robust path resolution approach.

-    const diamondPath = path.join(__dirname, '../../../diamond.json')
+    const diamondPath = path.join(process.cwd(), 'diamond.json')

And similarly for the deployments path:

-    const deploymentsPath = path.join(__dirname, '../../../deployments')
+    const deploymentsPath = path.join(process.cwd(), 'deployments')

Also applies to: 115-115


221-222: Make external API URL configurable.

The hardcoded API URL should be configurable through environment variables for flexibility and easier testing.

+    const apiUrl = process.env.SIGNATURE_API_URL || 'https://api.openchain.xyz/signature-database/v1/lookup'
     const response = await fetch(
-      `https://api.openchain.xyz/signature-database/v1/lookup?function=${selector}&filter=true`
+      `${apiUrl}?function=${selector}&filter=true`
     )

404-419: Simplify nested loop logic with early returns.

The nested loops in the generic pattern section could be simplified for better readability.

       // Check nested arrays (common in multicall patterns)
       if (Array.isArray(arg))
         for (const item of arg)
+        {
           if (
             typeof item === 'object' &&
             item !== null &&
             'data' in item &&
             typeof item.data === 'string'
           )
             return item.data as Hex
-          else if (
+          
+          if (
             typeof item === 'string' &&
             item.startsWith('0x') &&
             item.length > 10
           )
             return item as Hex
+        }
script/deploy/safe/confirm-safe-tx-utils.ts (2)

61-65: Consider using a proper type instead of any.

The result object uses any type which reduces type safety. Consider defining a proper return type interface.

-  const result: any = {
+  const result: ReturnType<typeof prepareNestedCallDisplay> extends Promise<infer T> ? T : never = {
     functionName: nested.functionName || nested.selector,
     contractName: nested.contractName,
     decodedVia: nested.decodedVia,
-  }
+  } as any // Type assertion needed until all properties are set

68-97: Consider consolidating diamondCut handling logic.

The three separate conditions for handling diamondCut could be simplified for better maintainability.

-  // Handle diamondCut specially
-  if (nested.functionName === 'diamondCut' && nested.args)
-    try {
-      // Note: decodeDiamondCut modifies console output directly
-      // For testing, we'd need to refactor that too
-      result.diamondCutData = {
-        functionName: 'diamondCut',
-        args: nested.args,
-      }
-    } catch (error) {
-      result.error = error instanceof Error ? error.message : String(error)
-    }
-  else if (
-    nested.functionName === 'diamondCut' &&
-    !nested.args &&
-    nested.rawData
-  )
-    // Try to decode if we have raw data but no args
-    try {
-      // In a real implementation, this would decode the raw data
-      // For now, we'll just return an error
-      result.error = 'Failed to decode diamondCut: Unknown signature'
-    } catch (error) {
-      result.error = error instanceof Error ? error.message : String(error)
-    }
-  else if (
-    nested.functionName === 'diamondCut' &&
-    nested.decodedVia === 'unknown'
-  )
-    result.error = 'No ABI found for diamondCut function'
+  // Handle diamondCut specially
+  if (nested.functionName === 'diamondCut') {
+    if (nested.args) {
+      try {
+        // Note: decodeDiamondCut modifies console output directly
+        // For testing, we'd need to refactor that too
+        result.diamondCutData = {
+          functionName: 'diamondCut',
+          args: nested.args,
+        }
+      } catch (error) {
+        result.error = error instanceof Error ? error.message : String(error)
+      }
+    } else if (nested.rawData) {
+      // Try to decode if we have raw data but no args
+      try {
+        // In a real implementation, this would decode the raw data
+        // For now, we'll just return an error
+        result.error = 'Failed to decode diamondCut: Unknown signature'
+      } catch (error) {
+        result.error = error instanceof Error ? error.message : String(error)
+      }
+    } else if (nested.decodedVia === 'unknown') {
+      result.error = 'No ABI found for diamondCut function'
+    }
+  }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bd3e39f and 82554a6.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • .github/workflows/test.yml (1 hunks)
  • .husky/pre-commit (1 hunks)
  • conventions.md (1 hunks)
  • package.json (1 hunks)
  • script/deploy/safe/confirm-safe-tx-utils.ts (1 hunks)
  • script/deploy/safe/confirm-safe-tx.test.ts (1 hunks)
  • script/deploy/safe/confirm-safe-tx.ts (13 hunks)
  • script/deploy/safe/fixtures/deployment-log.json (1 hunks)
  • script/deploy/safe/fixtures/sample-transactions.ts (1 hunks)
  • script/deploy/safe/safe-decode-utils.test.ts (1 hunks)
  • script/deploy/safe/safe-decode-utils.ts (1 hunks)
  • script/deploy/safe/safe-utils.ts (0 hunks)
  • tsconfig.json (1 hunks)
📓 Path-based instructions (2)
script/**/*.ts

📄 CodeRabbit Inference Engine (conventions.md)

script/**/*.ts: All TypeScript scripts must follow the rules defined in .eslintrc.cjs.
All TypeScript scripts must use async/await for asynchronous operations.
All TypeScript scripts must use citty for CLI argument parsing.
All TypeScript scripts must use consola for consistent logging.
Environment variables in TypeScript scripts should be validated using getEnvVar() helper.
TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).
All scripts should use bunx tsx for TypeScript execution.

Files:

  • script/deploy/safe/confirm-safe-tx.test.ts
  • script/deploy/safe/confirm-safe-tx-utils.ts
  • script/deploy/safe/fixtures/sample-transactions.ts
  • script/deploy/safe/safe-decode-utils.ts
  • script/deploy/safe/safe-decode-utils.test.ts
  • script/deploy/safe/confirm-safe-tx.ts
.github/workflows/*.yml

📄 CodeRabbit Inference Engine (conventions.md)

.github/workflows/*.yml: Use GitHub Secrets for sensitive data in GitHub workflows and reference with ${{ secrets.SECRET_NAME }}.
GitHub workflow files must begin with a clear description (YAML comments) and include descriptive comments throughout.
GitHub workflow files must define triggers explicitly, use conditional checks with if:, name jobs and steps clearly, include notification steps, and set explicit permissions with comments.

Files:

  • .github/workflows/test.yml
🧠 Learnings (13)
📓 Common learnings
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The `submitAndExecuteTransaction` function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.
Learnt from: mirooon
PR: lifinance/contracts#1187
File: .github/workflows/versionControlAndAuditCheck.yml:596-612
Timestamp: 2025-06-05T11:25:43.443Z
Learning: The user mirooon has an internal system for tracking tickets and technical debt. They acknowledged the security concern about disabled commit hash verification in the audit workflow and plan to implement conditional logic to skip verification only for revert PRs in a future update.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:627-628
Timestamp: 2025-07-17T04:21:26.825Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep '0x0' as a fallback address in gas estimation calls rather than throwing errors when the wallet account address is not available, prioritizing code simplicity over strict validation.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1275
File: src/Facets/AllBridgeFacet.sol:164-164
Timestamp: 2025-07-16T01:03:08.106Z
Learning: In src/Facets/AllBridgeFacet.sol, the team has decided that explicit validation for address downcasting from `_bridgeData.sendingAssetId` to `bytes32(uint256(uint160(_bridgeData.sendingAssetId)))` is not required, accepting the potential risk of silent overflow from unsafe downcasting.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1169
File: script/deploy/zksync/DeployFeeCollector.zksync.s.sol:32-37
Timestamp: 2025-05-27T12:00:43.940Z
Learning: The lifinance/contracts repository has deployment scripts that perform validation checks (including zero-address validation) before executing individual deploy scripts, making runtime validation checks in the deploy scripts themselves redundant.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the `submitAndExecuteTransaction` function, making additional try-catch blocks around its calls unnecessary.
Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.
Learnt from: ezynda3
PR: lifinance/contracts#861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In `script/deploy/safe/add-owners-to-safe.ts`, runtime validation for network configuration using Zod is not required; type assertions are acceptable.
Learnt from: mirooon
PR: lifinance/contracts#950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.
Learnt from: 0xDEnYO
PR: lifinance/contracts#847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the `script/tasks/fundNewWalletOnAllChains.ts` file, adding a timeout to the transaction confirmation wait using `publicClient.waitForTransactionReceipt` is not required.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.
Learnt from: ezynda3
PR: lifinance/contracts#861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In `script/deploy/safe/add-owners-to-safe.ts`, validation for network configuration when casting imported JSON data to `NetworksObject` is not required as per the user's preference.
Learnt from: ezynda3
PR: lifinance/contracts#1124
File: script/demoScripts/utils/lib/cowShedSdk.ts:0-0
Timestamp: 2025-06-05T14:50:17.275Z
Learning: For demo scripts and example code, ezynda3 prefers to keep the code simple and focused on demonstrating the core functionality rather than adding extensive input validation or defensive programming measures.
tsconfig.json (12)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-09-18T01:47:54.439Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #1139
File: package.json:81-82
Timestamp: 2025-05-14T03:33:25.089Z
Learning: Bun allows direct invocation of npm scripts defined in package.json without requiring the bun run prefix (e.g., bun scriptName works, not just bun run scriptName), unlike some other package managers like npm.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: 0xDEnYO
PR: #998
File: script/deploy/updateNetworkDeploymentFile.ts:1-1
Timestamp: 2025-02-17T02:10:45.638Z
Learning: The team prefers proper TypeScript typing over using @ts-nocheck directives to ensure type safety.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: 0xDEnYO
PR: #935
File: script/tasks/diamondSyncSigs.sh:88-88
Timestamp: 2025-01-22T07:44:07.350Z
Learning: When executing TypeScript scripts from subdirectories like script/tasks/, the path to tsconfig.json should be relative to the script's location, not the project root. For example, ../../tsconfig.json is the correct path when executing from script/tasks/.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use async/await for asynchronous operations.

script/deploy/safe/fixtures/deployment-log.json (19)

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.diamond.json:84-85
Timestamp: 2025-04-21T03:15:12.236Z
Learning: In deployment JSON files that contain "diamond" in their filename (located in the deployments folder), periphery contracts may have empty string values for their addresses. This indicates that the contract is not deployed on that particular chain and should not be flagged as an issue during code reviews.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs updating contract addresses (like RelayFacet on Worldchain), verify the presence of entries in all relevant files (worldchain.json, worldchain.diamond.json, _deployments_log_file.json) before reporting inconsistencies. The RelayFacet entry exists in all required deployment files with the correct address.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs involving address updates like the RelayFacet to Worldchain, verify the actual presence of entries in files before reporting issues. The RelayFacet exists in the diamond log file and the PR diff already contains the necessary address change.

Learnt from: mirooon
PR: #1170
File: deployments/_deployments_log_file.json:28060-28072
Timestamp: 2025-05-28T17:33:33.959Z
Learning: Deployment log files like deployments/_deployments_log_file.json are historical records that document the actual versions deployed at specific times. They should not be updated to match current contract versions - they must accurately reflect what was deployed when the deployment occurred.

Learnt from: 0xDEnYO
PR: #812
File: deployments/polygon.diamond.json:4-11
Timestamp: 2024-09-27T07:10:15.586Z
Learning: In deployments/polygon.diamond.json, it's acceptable for certain facets to have empty names and versions when specified by the developer.

Learnt from: 0xDEnYO
PR: #819
File: deployments/scroll.diamond.json:82-82
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In the deployments/*.diamond.json and deployments/*.json files, the LiFiDEXAggregator contract may intentionally have the same contract address across multiple networks. This is acceptable and should not be flagged as an issue in future code reviews.

Learnt from: mirooon
PR: #1170
File: deployments/_deployments_log_file.json:28706-28717
Timestamp: 2025-05-28T17:33:10.529Z
Learning: Deployment log files (like _deployments_log_file.json) are historical records that should not be updated to match current contract versions. They should accurately reflect the versions that were actually deployed at specific timestamps.

Learnt from: 0xDEnYO
PR: #782
File: deployments/fantom.diamond.json:92-94
Timestamp: 2024-11-26T01:04:16.637Z
Learning: In deployments/*.diamond.json files, it's acceptable for facets to have empty Name and Version fields, and these should not be flagged as issues.

Learnt from: 0xDEnYO
PR: #782
File: deployments/base.diamond.json:148-148
Timestamp: 2024-11-25T09:05:43.045Z
Learning: In deployment configuration files (e.g., deployments/base.diamond.json), empty addresses for contracts like Permit2Proxy may be placeholders and will be updated after approvals are released from the multisig safe.

Learnt from: 0xDEnYO
PR: #832
File: deployments/_deployments_log_file.json:23712-23720
Timestamp: 2024-12-04T01:59:34.045Z
Learning: In deployments/_deployments_log_file.json, duplicate deployment entries for the same version and address may occur because they correspond to deployments on different networks. These entries are acceptable and should not be flagged as duplicates in future reviews.

Learnt from: 0xDEnYO
PR: #1207
File: deployments/_deployments_log_file.json:34037-34080
Timestamp: 2025-06-13T08:30:26.220Z
Learning: LiFiDiamond contains generic withdrawal logic, so individual facet contracts (e.g., PioneerFacet) do not need their own Ether-withdraw functions.

Learnt from: ezynda3
PR: #806
File: deployments/_deployments_log_file.json:5780-5793
Timestamp: 2024-10-09T03:47:21.269Z
Learning: The owner address 0x11f11121df7256c40339393b0fb045321022ce44 and the DiamondCutFacet address 0xd5cf40a2a18b633cfd6a1ae16d1771596498cf83 in the LiFiDiamond deployment on xlayer are correct and should not be flagged as issues, even if they are not referenced in the Solidity files.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to src/Facets/*Facet.sol : Facet contracts must reside in src/Facets/ and names must include "Facet".

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to src/Facets/*Facet.sol : Facet contracts must implement the functions: _startBridge (internal), swapAndStartBridgeTokensVia{FacetName}, and startBridgeTokensVia{FacetName}.

Learnt from: ezynda3
PR: #924
File: deployments/abstract.json:2-4
Timestamp: 2025-01-28T14:30:06.911Z
Learning: In the LiFi contract architecture, "LiFiDiamond" is the diamond proxy contract that connects all facets into a cohesive system. The facets are individual contracts that provide specific functionality, and the diamond proxy delegates calls to these facets.

Learnt from: ezynda3
PR: #846
File: deployments/cronos.diamond.json:28-31
Timestamp: 2024-11-01T11:53:57.162Z
Learning: In deployments/cronos.diamond.json, both GenericSwapFacet and GenericSwapFacetV3 are distinct facets that should be included together, as they serve different purposes.

Learnt from: ezynda3
PR: #984
File: docs/ChainflipFacet.md:0-0
Timestamp: 2025-02-13T08:57:00.095Z
Learning: The ChainflipData struct in ChainflipFacet has three fields:

  1. uint32 dstToken - The destination token identifier in Chainflip
  2. bytes32 nonEvmAddress - The non-EVM destination address
  3. bytes cfParameters - Additional parameters for Chainflip protocol

Learnt from: ezynda3
PR: #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.

Learnt from: ezynda3
PR: #827
File: src/Facets/DeBridgeDlnFacet.sol:0-0
Timestamp: 2024-11-22T08:49:35.205Z
Learning: In DeBridgeDlnFacet.sol, direct access to the deBridgeChainId mapping is acceptable, and using the getDeBridgeChainId function is not necessary in these instances.

script/deploy/safe/confirm-safe-tx.test.ts (14)

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: mirooon
PR: #945
File: test/solidity/utils/TestBase.sol:446-470
Timestamp: 2025-01-22T12:38:37.557Z
Learning: Test utility functions in TestBase.sol don't require production-level validations like slippage checks and input validation since they operate in a controlled test environment.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-04T09:21:59.708Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-09T03:47:21.269Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

conventions.md (16)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #998
File: script/deploy/updateNetworkDeploymentFile.ts:1-1
Timestamp: 2025-02-17T02:10:45.638Z
Learning: The team prefers proper TypeScript typing over using @ts-nocheck directives to ensure type safety.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All test files must have a .t.sol extension.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: 0xDEnYO
PR: #1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : Group and order imports in test files with system libraries first and project files next.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: 0xDEnYO
PR: #1207
File: script/deploy/facets/DeployPioneerFacet.s.sol:17-27
Timestamp: 2025-06-13T08:30:28.665Z
Learning: Deployment scripts rely on external automation (pre-script checks) to validate constructor arguments such as non-zero addresses, so adding explicit require guards inside the Foundry deployment scripts is generally unnecessary.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: All scripts should integrate seamlessly with the overall deployment pipeline and follow project-wide naming conventions.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must organize code into modular functions with clear sections (e.g., Logging, Error handling, Deployment functions).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to {script/deploy/facets/Deploy*.s.sol,script/deploy/facets/Update*.s.sol,script/deploy/zksync/Deploy*.s.sol,script/deploy/zksync/Update*.s.sol} : Deployment scripts must be located in script/deploy/facets/ or script/deploy/zksync/ and named Deploy{ContractName}.s.sol or Update{ContractName}.s.sol.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must check function exit status with checkFailure and use set -e where appropriate.

script/deploy/safe/confirm-safe-tx-utils.ts (9)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Moving towards Timelock-based governance for contract changes.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the submitAndExecuteTransaction function, making additional try-catch blocks around its calls unnecessary.

script/deploy/safe/fixtures/sample-transactions.ts (12)

Learnt from: ezynda3
PR: #984
File: test/solidity/Facets/ChainflipFacet.t.sol:269-269
Timestamp: 2025-02-21T09:05:22.118Z
Learning: Fixed gas amounts in test files (e.g., ChainflipFacet.t.sol) don't require extensive documentation or configuration as they are only used for testing purposes.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs updating contract addresses (like RelayFacet on Worldchain), verify the presence of entries in all relevant files (worldchain.json, worldchain.diamond.json, _deployments_log_file.json) before reporting inconsistencies. The RelayFacet entry exists in all required deployment files with the correct address.

Learnt from: ezynda3
PR: #924
File: script/deploy/zksync/utils/UpdateScriptBase.sol:112-178
Timestamp: 2025-01-28T14:29:00.823Z
Learning: The suggestion to modify buildDiamondCut function in UpdateScriptBase.sol to handle selectors from multiple old facets differently was deemed unnecessary by the maintainer.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #807
File: script/deploy/facets/DeployGasZipFacet.s.sol:22-35
Timestamp: 2024-09-23T01:42:03.075Z
Learning: In deployment scripts like DeployGasZipFacet.s.sol, do not report issues suggesting adding error handling for missing configuration files or unexpected JSON structures, as the script will fail if the file is missing.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest.ts:0-0
Timestamp: 2025-06-05T14:50:40.886Z
Learning: Demo scripts in this codebase can use hardcoded gas limits and other simplified values, as they prioritize demonstration clarity over production robustness.

Learnt from: mirooon
PR: #945
File: script/demoScripts/demoGlacis.ts:180-189
Timestamp: 2025-01-30T10:38:18.041Z
Learning: The executeTransaction helper function in the LiFi codebase handles error cases and transaction logging comprehensively, including try/catch structures, transaction receipt validation, and detailed console logging for transaction status tracking.

script/deploy/safe/safe-decode-utils.ts (7)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: ezynda3
PR: #924
File: script/deploy/zksync/utils/UpdateScriptBase.sol:112-178
Timestamp: 2025-01-28T14:29:00.823Z
Learning: The suggestion to modify buildDiamondCut function in UpdateScriptBase.sol to handle selectors from multiple old facets differently was deemed unnecessary by the maintainer.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: mirooon
PR: #950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.

.husky/pre-commit (11)

Learnt from: 0xDEnYO
PR: #837
File: archive/scripts/Deploy/zkSync/008_deploy_service_fee_collector.ts:4-4
Timestamp: 2024-10-21T03:24:01.288Z
Learning: Exclude anything in the ./archive folder for syntax errors, import paths, or related checks in future reviews.

Learnt from: 0xDEnYO
PR: #1232
File: script/deploy/_targetState.json:1680-1703
Timestamp: 2025-06-24T07:35:58.970Z
Learning: The user (0xDEnYO) has instructed to never review the target state file (script/deploy/_targetState.json). This file should be excluded from code review analysis.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #1184
File: script/deploy/safe/deploy-safe.ts:0-0
Timestamp: 2025-07-03T07:34:47.349Z
Learning: In script/deploy/safe/deploy-safe.ts, 0xDEnYO intentionally changed the allowOverride flag default from false to true to allow overwriting existing Safe addresses by default in deployment workflows.

Learnt from: 0xDEnYO
PR: #1207
File: script/deploy/facets/DeployPioneerFacet.s.sol:17-27
Timestamp: 2025-06-13T08:30:28.665Z
Learning: Deployment scripts rely on external automation (pre-script checks) to validate constructor arguments such as non-zero addresses, so adding explicit require guards inside the Foundry deployment scripts is generally unnecessary.

Learnt from: 0xDEnYO
PR: #807
File: script/deploy/facets/DeployGasZipFacet.s.sol:22-35
Timestamp: 2024-09-23T01:42:03.075Z
Learning: In deployment scripts like DeployGasZipFacet.s.sol, do not report issues suggesting adding error handling for missing configuration files or unexpected JSON structures, as the script will fail if the file is missing.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:67-100
Timestamp: 2024-11-08T03:12:44.309Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, suggested security improvements for configuring organization and team names as environment variables, handling API rate limits, addressing potential file permission issues, and mitigating command injection risks are not required.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must load environment variables from .env or config.sh and validate them early.

package.json (14)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #1139
File: package.json:81-82
Timestamp: 2025-05-14T03:33:25.089Z
Learning: Bun allows direct invocation of npm scripts defined in package.json without requiring the bun run prefix (e.g., bun scriptName works, not just bun run scriptName), unlike some other package managers like npm.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-09-18T01:47:54.439Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use async/await for asynchronous operations.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: mirooon
PR: #1145
File: script/tasks/diamondSyncWhitelistedAddresses.sh:208-209
Timestamp: 2025-06-05T10:00:01.583Z
Learning: Task scripts in script/tasks/ directory (like diamondSyncWhitelistedAddresses.sh) define functions that are sourced by deployAllContracts.sh and called from there, rather than executing directly. They don't need to call their own functions at the end of the file.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All test files must have a .t.sol extension.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:46-46
Timestamp: 2024-12-02T08:19:07.783Z
Learning: In our codebase, scripts like script/utils/fetch-missing-deployments.ts are intended to run in Node.js version 18 or newer, so global fetch is available without importing.

.github/workflows/test.yml (8)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #879
File: .github/workflows/types.yaml:58-62
Timestamp: 2024-11-27T04:28:26.318Z
Learning: In the file .github/workflows/types.yaml, additional error handling for file operations is not required in the 'Copy Type Bindings and ABI' step.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.

Learnt from: 0xDEnYO
PR: #879
File: .github/workflows/types.yaml:156-168
Timestamp: 2024-11-27T04:29:04.160Z
Learning: In the .github/workflows/types.yaml file, the current implementation of variable expansion and quoting in the shell scripts works correctly and does not need modification.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:67-100
Timestamp: 2024-11-08T03:12:44.309Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, suggested security improvements for configuring organization and team names as environment variables, handling API rate limits, addressing potential file permission issues, and mitigating command injection risks are not required.

Learnt from: 0xDEnYO
PR: #902
File: .github/workflows/forceMergePRBypassAudit.yml:31-47
Timestamp: 2024-12-12T02:05:50.929Z
Learning: In the Force-Merge PR (Bypass Audit Requirement) GitHub Actions workflow (.github/workflows/forceMergePRBypassAudit.yml), since the team members are controlled and the likelihood of regex injection is minimal, additional validation of team members is not necessary.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: 0xDEnYO
PR: #859
File: .github/workflows/enforceTestCoverage.yml:27-27
Timestamp: 2024-11-18T07:18:18.415Z
Learning: In the 'Enforce Min Test Coverage' GitHub Action workflow in the 'lifinance/contracts' repository, the action will fail if the MIN_TEST_COVERAGE secret is not set, so explicit validation is not required.

script/deploy/safe/safe-decode-utils.test.ts (16)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: mirooon
PR: #945
File: test/solidity/Facets/GlacisFacet.t.sol:214-262
Timestamp: 2025-01-22T12:36:12.699Z
Learning: The GlacisFacet test suite inherits from TestBaseFacet which already covers various failure scenarios including invalid receiver address, invalid amounts, same chain bridging, and insufficient funds, making additional failure scenario tests redundant.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: mirooon
PR: #945
File: test/solidity/utils/TestBase.sol:446-470
Timestamp: 2025-01-22T12:38:37.557Z
Learning: Test utility functions in TestBase.sol don't require production-level validations like slippage checks and input validation since they operate in a controlled test environment.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-09T03:47:21.269Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-04T09:21:59.708Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest.ts:0-0
Timestamp: 2025-06-05T14:50:40.886Z
Learning: Demo scripts in this codebase can use hardcoded gas limits and other simplified values, as they prioritize demonstration clarity over production robustness.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest_new.ts:0-0
Timestamp: 2025-06-05T14:25:19.137Z
Learning: Error handling for findNeedleOffset function calls is not needed in demo scripts in the lifinance/contracts repository, as indicated by the team's preference to keep demo scripts simpler.

Learnt from: 0xDEnYO
PR: #1208
File: test/solidity/utils/TestAMM.sol:18-22
Timestamp: 2025-06-15T08:47:22.079Z
Learning: For test contracts in the lifinance/contracts repository, simpler error handling approaches are acceptable and preferred over more complex error bubbling mechanisms, as the focus is on functionality rather than detailed error reporting.

Learnt from: ezynda3
PR: #1198
File: test/solidity/Helpers/SwapperV2.t.sol:50-69
Timestamp: 2025-06-19T10:42:55.379Z
Learning: Test code in Solidity (e.g., contracts in test/ directories) typically doesn't require the same level of input validation as production code, as tests are designed to validate specific scenarios with controlled inputs and may need to test edge cases.

script/deploy/safe/confirm-safe-tx.ts (28)

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the submitAndExecuteTransaction function, making additional try-catch blocks around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: mirooon
PR: #950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:39.984Z
Learning: In the script/deploy/safe/add-owners-to-safe.ts script, explicit error handling for missing network configuration is not required because the script will fail anyway if the network is not configured.

Learnt from: mirooon
PR: #945
File: script/demoScripts/demoGlacis.ts:180-189
Timestamp: 2025-01-30T10:38:18.041Z
Learning: The executeTransaction helper function in the LiFi codebase handles error cases and transaction logging comprehensively, including try/catch structures, transaction receipt validation, and detailed console logging for transaction status tracking.

Learnt from: 0xDEnYO
PR: #992
File: config/networks.json:650-667
Timestamp: 2025-02-13T10:10:58.521Z
Learning: The Safe transaction service endpoint for unichain (https://safe-transaction-unichain.safe.global/api) is correctly configured despite potential intermittent availability during testing.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:290-302
Timestamp: 2025-05-12T09:54:11.208Z
Learning: In the viem library, the publicClient.waitForTransactionReceipt function has a built-in default timeout of 180,000 milliseconds (3 minutes), making additional timeout handling mechanisms unnecessary unless a different timeout value is desired.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:290-302
Timestamp: 2025-05-12T09:54:11.208Z
Learning: In the viem library, the publicClient.waitForTransactionReceipt function has a built-in default timeout of 180,000 milliseconds (3 minutes), making additional timeout handling mechanisms unnecessary unless a different timeout value is desired.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:39-90
Timestamp: 2025-03-20T15:41:47.322Z
Learning: When deploying a Gnosis Safe, the threshold value (number of required signatures) must never exceed the total number of owners. This validation should be added to any Safe deployment scripts to prevent configuration errors.

Learnt from: ezynda3
PR: #861
File: script/deploy/healthCheck.ts:387-388
Timestamp: 2024-11-21T08:24:22.802Z
Learning: In script/deploy/healthCheck.ts, handling the case when networkConfig is undefined is unnecessary because the code will fail anyway.

Learnt from: ezynda3
PR: #827
File: config/networks.json:448-448
Timestamp: 2024-11-22T08:50:28.878Z
Learning: In config/networks.json, Safe addresses (safeAddress fields) do not need to be verified, as they are handled separately.

Learnt from: 0xDEnYO
PR: #858
File: config/networks.json:17-17
Timestamp: 2024-11-18T07:19:28.651Z
Learning: In the config/networks.json file, it's expected that the safeWebUrl field may have different formats and URLs across networks; standardizing them is not desired.

Learnt from: mirooon
PR: #1283
File: config/networks.json:837-839
Timestamp: 2025-07-17T11:31:50.058Z
Learning: In config/networks.json for the Ronin network (chainId 2020), there is a problematic mismatch between verificationType ("blockscout") and explorerApiUrl ("https://sourcify.roninchain.com/server"). This inconsistency can lead to verification issues and should be flagged when networks.json is modified in future PRs.

Learnt from: 0xDEnYO
PR: #825
File: config/networks.json:462-462
Timestamp: 2024-10-11T22:01:09.826Z
Learning: In the networks.json file and related configuration files, when updating the name property of a network (e.g., from Scroll to zkScroll), the key of the network object should remain unchanged (e.g., 'scroll') to ensure it matches references elsewhere in the codebase.

Learnt from: 0xDEnYO
PR: #825
File: config/networks.json:462-462
Timestamp: 2024-10-08T07:14:52.296Z
Learning: In the networks.json file and related configuration files, when updating the name property of a network (e.g., from Scroll to zkScroll), the key of the network object should remain unchanged (e.g., 'scroll') to ensure it matches references elsewhere in the codebase.

Learnt from: ezynda3
PR: #861
File: config/global.json:146-146
Timestamp: 2024-11-21T08:34:30.300Z
Learning: The project is deprecating safeAddresses and safeApiUrls in global.json and moving these configurations to config/networks.json for network configurations.

Learnt from: ezynda3
PR: #875
File: config/amarok.json:111-116
Timestamp: 2024-11-26T07:14:08.986Z
Learning: For the Lisk chain (chainId 1135), it's acceptable to have an empty connextHandler, domain, and tokensToApprove in config/amarok.json even if networks.json marks Lisk as "status": "active".

Learnt from: 0xDEnYO
PR: #819
File: deployments/avalanche.diamond.json:105-105
Timestamp: 2024-10-04T09:17:19.275Z
Learning: In the lifinance/contracts repository, contracts may have different addresses across networks. Do not check if contracts have the same addresses across all networks in future reviews.

Learnt from: 0xDEnYO
PR: #819
File: deployments/avalanche.diamond.json:105-105
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In the lifinance/contracts repository, contracts may have different addresses across networks. Do not check if contracts have the same addresses across all networks in future reviews.

🪛 Biome (1.9.4)
script/deploy/safe/confirm-safe-tx-utils.ts

[error] 132-132: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

script/deploy/safe/safe-decode-utils.test.ts

[error] 140-140: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

💤 Files with no reviewable changes (1)
  • script/deploy/safe/safe-utils.ts
🧰 Additional context used
📓 Path-based instructions (2)
script/**/*.ts

📄 CodeRabbit Inference Engine (conventions.md)

script/**/*.ts: All TypeScript scripts must follow the rules defined in .eslintrc.cjs.
All TypeScript scripts must use async/await for asynchronous operations.
All TypeScript scripts must use citty for CLI argument parsing.
All TypeScript scripts must use consola for consistent logging.
Environment variables in TypeScript scripts should be validated using getEnvVar() helper.
TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).
All scripts should use bunx tsx for TypeScript execution.

Files:

  • script/deploy/safe/confirm-safe-tx.test.ts
  • script/deploy/safe/confirm-safe-tx-utils.ts
  • script/deploy/safe/fixtures/sample-transactions.ts
  • script/deploy/safe/safe-decode-utils.ts
  • script/deploy/safe/safe-decode-utils.test.ts
  • script/deploy/safe/confirm-safe-tx.ts
.github/workflows/*.yml

📄 CodeRabbit Inference Engine (conventions.md)

.github/workflows/*.yml: Use GitHub Secrets for sensitive data in GitHub workflows and reference with ${{ secrets.SECRET_NAME }}.
GitHub workflow files must begin with a clear description (YAML comments) and include descriptive comments throughout.
GitHub workflow files must define triggers explicitly, use conditional checks with if:, name jobs and steps clearly, include notification steps, and set explicit permissions with comments.

Files:

  • .github/workflows/test.yml
🧠 Learnings (13)
📓 Common learnings
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The `submitAndExecuteTransaction` function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.
Learnt from: mirooon
PR: lifinance/contracts#1187
File: .github/workflows/versionControlAndAuditCheck.yml:596-612
Timestamp: 2025-06-05T11:25:43.443Z
Learning: The user mirooon has an internal system for tracking tickets and technical debt. They acknowledged the security concern about disabled commit hash verification in the audit workflow and plan to implement conditional logic to skip verification only for revert PRs in a future update.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:627-628
Timestamp: 2025-07-17T04:21:26.825Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep '0x0' as a fallback address in gas estimation calls rather than throwing errors when the wallet account address is not available, prioritizing code simplicity over strict validation.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1275
File: src/Facets/AllBridgeFacet.sol:164-164
Timestamp: 2025-07-16T01:03:08.106Z
Learning: In src/Facets/AllBridgeFacet.sol, the team has decided that explicit validation for address downcasting from `_bridgeData.sendingAssetId` to `bytes32(uint256(uint160(_bridgeData.sendingAssetId)))` is not required, accepting the potential risk of silent overflow from unsafe downcasting.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1169
File: script/deploy/zksync/DeployFeeCollector.zksync.s.sol:32-37
Timestamp: 2025-05-27T12:00:43.940Z
Learning: The lifinance/contracts repository has deployment scripts that perform validation checks (including zero-address validation) before executing individual deploy scripts, making runtime validation checks in the deploy scripts themselves redundant.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the `submitAndExecuteTransaction` function, making additional try-catch blocks around its calls unnecessary.
Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.
Learnt from: ezynda3
PR: lifinance/contracts#861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In `script/deploy/safe/add-owners-to-safe.ts`, runtime validation for network configuration using Zod is not required; type assertions are acceptable.
Learnt from: mirooon
PR: lifinance/contracts#950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.
Learnt from: 0xDEnYO
PR: lifinance/contracts#847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the `script/tasks/fundNewWalletOnAllChains.ts` file, adding a timeout to the transaction confirmation wait using `publicClient.waitForTransactionReceipt` is not required.
Learnt from: 0xDEnYO
PR: lifinance/contracts#1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.
Learnt from: ezynda3
PR: lifinance/contracts#861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In `script/deploy/safe/add-owners-to-safe.ts`, validation for network configuration when casting imported JSON data to `NetworksObject` is not required as per the user's preference.
Learnt from: ezynda3
PR: lifinance/contracts#1124
File: script/demoScripts/utils/lib/cowShedSdk.ts:0-0
Timestamp: 2025-06-05T14:50:17.275Z
Learning: For demo scripts and example code, ezynda3 prefers to keep the code simple and focused on demonstrating the core functionality rather than adding extensive input validation or defensive programming measures.
tsconfig.json (12)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-09-18T01:47:54.439Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #1139
File: package.json:81-82
Timestamp: 2025-05-14T03:33:25.089Z
Learning: Bun allows direct invocation of npm scripts defined in package.json without requiring the bun run prefix (e.g., bun scriptName works, not just bun run scriptName), unlike some other package managers like npm.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: 0xDEnYO
PR: #998
File: script/deploy/updateNetworkDeploymentFile.ts:1-1
Timestamp: 2025-02-17T02:10:45.638Z
Learning: The team prefers proper TypeScript typing over using @ts-nocheck directives to ensure type safety.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: 0xDEnYO
PR: #935
File: script/tasks/diamondSyncSigs.sh:88-88
Timestamp: 2025-01-22T07:44:07.350Z
Learning: When executing TypeScript scripts from subdirectories like script/tasks/, the path to tsconfig.json should be relative to the script's location, not the project root. For example, ../../tsconfig.json is the correct path when executing from script/tasks/.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use async/await for asynchronous operations.

script/deploy/safe/fixtures/deployment-log.json (19)

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.diamond.json:84-85
Timestamp: 2025-04-21T03:15:12.236Z
Learning: In deployment JSON files that contain "diamond" in their filename (located in the deployments folder), periphery contracts may have empty string values for their addresses. This indicates that the contract is not deployed on that particular chain and should not be flagged as an issue during code reviews.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs updating contract addresses (like RelayFacet on Worldchain), verify the presence of entries in all relevant files (worldchain.json, worldchain.diamond.json, _deployments_log_file.json) before reporting inconsistencies. The RelayFacet entry exists in all required deployment files with the correct address.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs involving address updates like the RelayFacet to Worldchain, verify the actual presence of entries in files before reporting issues. The RelayFacet exists in the diamond log file and the PR diff already contains the necessary address change.

Learnt from: mirooon
PR: #1170
File: deployments/_deployments_log_file.json:28060-28072
Timestamp: 2025-05-28T17:33:33.959Z
Learning: Deployment log files like deployments/_deployments_log_file.json are historical records that document the actual versions deployed at specific times. They should not be updated to match current contract versions - they must accurately reflect what was deployed when the deployment occurred.

Learnt from: 0xDEnYO
PR: #812
File: deployments/polygon.diamond.json:4-11
Timestamp: 2024-09-27T07:10:15.586Z
Learning: In deployments/polygon.diamond.json, it's acceptable for certain facets to have empty names and versions when specified by the developer.

Learnt from: 0xDEnYO
PR: #819
File: deployments/scroll.diamond.json:82-82
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In the deployments/*.diamond.json and deployments/*.json files, the LiFiDEXAggregator contract may intentionally have the same contract address across multiple networks. This is acceptable and should not be flagged as an issue in future code reviews.

Learnt from: mirooon
PR: #1170
File: deployments/_deployments_log_file.json:28706-28717
Timestamp: 2025-05-28T17:33:10.529Z
Learning: Deployment log files (like _deployments_log_file.json) are historical records that should not be updated to match current contract versions. They should accurately reflect the versions that were actually deployed at specific timestamps.

Learnt from: 0xDEnYO
PR: #782
File: deployments/fantom.diamond.json:92-94
Timestamp: 2024-11-26T01:04:16.637Z
Learning: In deployments/*.diamond.json files, it's acceptable for facets to have empty Name and Version fields, and these should not be flagged as issues.

Learnt from: 0xDEnYO
PR: #782
File: deployments/base.diamond.json:148-148
Timestamp: 2024-11-25T09:05:43.045Z
Learning: In deployment configuration files (e.g., deployments/base.diamond.json), empty addresses for contracts like Permit2Proxy may be placeholders and will be updated after approvals are released from the multisig safe.

Learnt from: 0xDEnYO
PR: #832
File: deployments/_deployments_log_file.json:23712-23720
Timestamp: 2024-12-04T01:59:34.045Z
Learning: In deployments/_deployments_log_file.json, duplicate deployment entries for the same version and address may occur because they correspond to deployments on different networks. These entries are acceptable and should not be flagged as duplicates in future reviews.

Learnt from: 0xDEnYO
PR: #1207
File: deployments/_deployments_log_file.json:34037-34080
Timestamp: 2025-06-13T08:30:26.220Z
Learning: LiFiDiamond contains generic withdrawal logic, so individual facet contracts (e.g., PioneerFacet) do not need their own Ether-withdraw functions.

Learnt from: ezynda3
PR: #806
File: deployments/_deployments_log_file.json:5780-5793
Timestamp: 2024-10-09T03:47:21.269Z
Learning: The owner address 0x11f11121df7256c40339393b0fb045321022ce44 and the DiamondCutFacet address 0xd5cf40a2a18b633cfd6a1ae16d1771596498cf83 in the LiFiDiamond deployment on xlayer are correct and should not be flagged as issues, even if they are not referenced in the Solidity files.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to src/Facets/*Facet.sol : Facet contracts must reside in src/Facets/ and names must include "Facet".

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to src/Facets/*Facet.sol : Facet contracts must implement the functions: _startBridge (internal), swapAndStartBridgeTokensVia{FacetName}, and startBridgeTokensVia{FacetName}.

Learnt from: ezynda3
PR: #924
File: deployments/abstract.json:2-4
Timestamp: 2025-01-28T14:30:06.911Z
Learning: In the LiFi contract architecture, "LiFiDiamond" is the diamond proxy contract that connects all facets into a cohesive system. The facets are individual contracts that provide specific functionality, and the diamond proxy delegates calls to these facets.

Learnt from: ezynda3
PR: #846
File: deployments/cronos.diamond.json:28-31
Timestamp: 2024-11-01T11:53:57.162Z
Learning: In deployments/cronos.diamond.json, both GenericSwapFacet and GenericSwapFacetV3 are distinct facets that should be included together, as they serve different purposes.

Learnt from: ezynda3
PR: #984
File: docs/ChainflipFacet.md:0-0
Timestamp: 2025-02-13T08:57:00.095Z
Learning: The ChainflipData struct in ChainflipFacet has three fields:

  1. uint32 dstToken - The destination token identifier in Chainflip
  2. bytes32 nonEvmAddress - The non-EVM destination address
  3. bytes cfParameters - Additional parameters for Chainflip protocol

Learnt from: ezynda3
PR: #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.

Learnt from: ezynda3
PR: #827
File: src/Facets/DeBridgeDlnFacet.sol:0-0
Timestamp: 2024-11-22T08:49:35.205Z
Learning: In DeBridgeDlnFacet.sol, direct access to the deBridgeChainId mapping is acceptable, and using the getDeBridgeChainId function is not necessary in these instances.

script/deploy/safe/confirm-safe-tx.test.ts (14)

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: mirooon
PR: #945
File: test/solidity/utils/TestBase.sol:446-470
Timestamp: 2025-01-22T12:38:37.557Z
Learning: Test utility functions in TestBase.sol don't require production-level validations like slippage checks and input validation since they operate in a controlled test environment.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-04T09:21:59.708Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-09T03:47:21.269Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

conventions.md (16)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #998
File: script/deploy/updateNetworkDeploymentFile.ts:1-1
Timestamp: 2025-02-17T02:10:45.638Z
Learning: The team prefers proper TypeScript typing over using @ts-nocheck directives to ensure type safety.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All test files must have a .t.sol extension.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: 0xDEnYO
PR: #1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : Group and order imports in test files with system libraries first and project files next.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: 0xDEnYO
PR: #1207
File: script/deploy/facets/DeployPioneerFacet.s.sol:17-27
Timestamp: 2025-06-13T08:30:28.665Z
Learning: Deployment scripts rely on external automation (pre-script checks) to validate constructor arguments such as non-zero addresses, so adding explicit require guards inside the Foundry deployment scripts is generally unnecessary.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: All scripts should integrate seamlessly with the overall deployment pipeline and follow project-wide naming conventions.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must organize code into modular functions with clear sections (e.g., Logging, Error handling, Deployment functions).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to {script/deploy/facets/Deploy*.s.sol,script/deploy/facets/Update*.s.sol,script/deploy/zksync/Deploy*.s.sol,script/deploy/zksync/Update*.s.sol} : Deployment scripts must be located in script/deploy/facets/ or script/deploy/zksync/ and named Deploy{ContractName}.s.sol or Update{ContractName}.s.sol.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must check function exit status with checkFailure and use set -e where appropriate.

script/deploy/safe/confirm-safe-tx-utils.ts (9)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Moving towards Timelock-based governance for contract changes.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the submitAndExecuteTransaction function, making additional try-catch blocks around its calls unnecessary.

script/deploy/safe/fixtures/sample-transactions.ts (12)

Learnt from: ezynda3
PR: #984
File: test/solidity/Facets/ChainflipFacet.t.sol:269-269
Timestamp: 2025-02-21T09:05:22.118Z
Learning: Fixed gas amounts in test files (e.g., ChainflipFacet.t.sol) don't require extensive documentation or configuration as they are only used for testing purposes.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1109
File: deployments/worldchain.json:28-28
Timestamp: 2025-04-21T03:17:53.443Z
Learning: For deployment PRs updating contract addresses (like RelayFacet on Worldchain), verify the presence of entries in all relevant files (worldchain.json, worldchain.diamond.json, _deployments_log_file.json) before reporting inconsistencies. The RelayFacet entry exists in all required deployment files with the correct address.

Learnt from: ezynda3
PR: #924
File: script/deploy/zksync/utils/UpdateScriptBase.sol:112-178
Timestamp: 2025-01-28T14:29:00.823Z
Learning: The suggestion to modify buildDiamondCut function in UpdateScriptBase.sol to handle selectors from multiple old facets differently was deemed unnecessary by the maintainer.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #807
File: script/deploy/facets/DeployGasZipFacet.s.sol:22-35
Timestamp: 2024-09-23T01:42:03.075Z
Learning: In deployment scripts like DeployGasZipFacet.s.sol, do not report issues suggesting adding error handling for missing configuration files or unexpected JSON structures, as the script will fail if the file is missing.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest.ts:0-0
Timestamp: 2025-06-05T14:50:40.886Z
Learning: Demo scripts in this codebase can use hardcoded gas limits and other simplified values, as they prioritize demonstration clarity over production robustness.

Learnt from: mirooon
PR: #945
File: script/demoScripts/demoGlacis.ts:180-189
Timestamp: 2025-01-30T10:38:18.041Z
Learning: The executeTransaction helper function in the LiFi codebase handles error cases and transaction logging comprehensively, including try/catch structures, transaction receipt validation, and detailed console logging for transaction status tracking.

script/deploy/safe/safe-decode-utils.ts (7)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: ezynda3
PR: #924
File: script/deploy/zksync/utils/UpdateScriptBase.sol:112-178
Timestamp: 2025-01-28T14:29:00.823Z
Learning: The suggestion to modify buildDiamondCut function in UpdateScriptBase.sol to handle selectors from multiple old facets differently was deemed unnecessary by the maintainer.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: mirooon
PR: #950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.

.husky/pre-commit (11)

Learnt from: 0xDEnYO
PR: #837
File: archive/scripts/Deploy/zkSync/008_deploy_service_fee_collector.ts:4-4
Timestamp: 2024-10-21T03:24:01.288Z
Learning: Exclude anything in the ./archive folder for syntax errors, import paths, or related checks in future reviews.

Learnt from: 0xDEnYO
PR: #1232
File: script/deploy/_targetState.json:1680-1703
Timestamp: 2025-06-24T07:35:58.970Z
Learning: The user (0xDEnYO) has instructed to never review the target state file (script/deploy/_targetState.json). This file should be excluded from code review analysis.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #1184
File: script/deploy/safe/deploy-safe.ts:0-0
Timestamp: 2025-07-03T07:34:47.349Z
Learning: In script/deploy/safe/deploy-safe.ts, 0xDEnYO intentionally changed the allowOverride flag default from false to true to allow overwriting existing Safe addresses by default in deployment workflows.

Learnt from: 0xDEnYO
PR: #1207
File: script/deploy/facets/DeployPioneerFacet.s.sol:17-27
Timestamp: 2025-06-13T08:30:28.665Z
Learning: Deployment scripts rely on external automation (pre-script checks) to validate constructor arguments such as non-zero addresses, so adding explicit require guards inside the Foundry deployment scripts is generally unnecessary.

Learnt from: 0xDEnYO
PR: #807
File: script/deploy/facets/DeployGasZipFacet.s.sol:22-35
Timestamp: 2024-09-23T01:42:03.075Z
Learning: In deployment scripts like DeployGasZipFacet.s.sol, do not report issues suggesting adding error handling for missing configuration files or unexpected JSON structures, as the script will fail if the file is missing.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:67-100
Timestamp: 2024-11-08T03:12:44.309Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, suggested security improvements for configuring organization and team names as environment variables, handling API rate limits, addressing potential file permission issues, and mitigating command injection risks are not required.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.sh : Bash scripts must load environment variables from .env or config.sh and validate them early.

package.json (14)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #1139
File: package.json:81-82
Timestamp: 2025-05-14T03:33:25.089Z
Learning: Bun allows direct invocation of npm scripts defined in package.json without requiring the bun run prefix (e.g., bun scriptName works, not just bun run scriptName), unlike some other package managers like npm.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must follow the rules defined in .eslintrc.cjs.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-09-18T01:47:54.439Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: 0xDEnYO
PR: #803
File: tsconfig.json:11-11
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In this project, including "DOM" in the "lib" array of tsconfig.json is acceptable to enable the use of fetch in scripts.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use async/await for asynchronous operations.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use consola for consistent logging.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:0-0
Timestamp: 2024-12-04T12:57:56.493Z
Learning: In the TypeScript file script/utils/fetch-missing-deployments.ts, the existing regex pattern /\/\/\/\s*@custom:version\s*([\d.]+)/ used for version extraction is sufficient and does not require modification.

Learnt from: mirooon
PR: #1145
File: script/tasks/diamondSyncWhitelistedAddresses.sh:208-209
Timestamp: 2025-06-05T10:00:01.583Z
Learning: Task scripts in script/tasks/ directory (like diamondSyncWhitelistedAddresses.sh) define functions that are sourced by deployAllContracts.sh and called from there, rather than executing directly. They don't need to call their own functions at the end of the file.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All tests that verify a successful execution must be prefixed with: test_.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to test/**/*.t.sol : All test files must have a .t.sol extension.

Learnt from: ezynda3
PR: #875
File: script/utils/fetch-missing-deployments.ts:46-46
Timestamp: 2024-12-02T08:19:07.783Z
Learning: In our codebase, scripts like script/utils/fetch-missing-deployments.ts are intended to run in Node.js version 18 or newer, so global fetch is available without importing.

.github/workflows/test.yml (8)

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All scripts should use bunx tsx for TypeScript execution.

Learnt from: 0xDEnYO
PR: #879
File: .github/workflows/types.yaml:58-62
Timestamp: 2024-11-27T04:28:26.318Z
Learning: In the file .github/workflows/types.yaml, additional error handling for file operations is not required in the 'Copy Type Bindings and ABI' step.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.

Learnt from: 0xDEnYO
PR: #879
File: .github/workflows/types.yaml:156-168
Timestamp: 2024-11-27T04:29:04.160Z
Learning: In the .github/workflows/types.yaml file, the current implementation of variable expansion and quoting in the shell scripts works correctly and does not need modification.

Learnt from: 0xDEnYO
PR: #853
File: .github/workflows/protectSecurityRelevantCode.yml:67-100
Timestamp: 2024-11-08T03:12:44.309Z
Learning: In the .github/workflows/protectSecurityRelevantCode.yml file, suggested security improvements for configuring organization and team names as environment variables, handling API rate limits, addressing potential file permission issues, and mitigating command injection risks are not required.

Learnt from: 0xDEnYO
PR: #902
File: .github/workflows/forceMergePRBypassAudit.yml:31-47
Timestamp: 2024-12-12T02:05:50.929Z
Learning: In the Force-Merge PR (Bypass Audit Requirement) GitHub Actions workflow (.github/workflows/forceMergePRBypassAudit.yml), since the team members are controlled and the likelihood of regex injection is minimal, additional validation of team members is not necessary.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : TypeScript scripts should exit with appropriate exit codes (0 for success, 1 for error).

Learnt from: 0xDEnYO
PR: #859
File: .github/workflows/enforceTestCoverage.yml:27-27
Timestamp: 2024-11-18T07:18:18.415Z
Learning: In the 'Enforce Min Test Coverage' GitHub Action workflow in the 'lifinance/contracts' repository, the action will fail if the MIN_TEST_COVERAGE secret is not set, so explicit validation is not required.

script/deploy/safe/safe-decode-utils.test.ts (16)

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: mirooon
PR: #945
File: test/solidity/Facets/GlacisFacet.t.sol:214-262
Timestamp: 2025-01-22T12:36:12.699Z
Learning: The GlacisFacet test suite inherits from TestBaseFacet which already covers various failure scenarios including invalid receiver address, invalid amounts, same chain bridging, and insufficient funds, making additional failure scenario tests redundant.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: mirooon
PR: #945
File: test/solidity/utils/TestBase.sol:446-470
Timestamp: 2025-01-22T12:38:37.557Z
Learning: Test utility functions in TestBase.sol don't require production-level validations like slippage checks and input validation since they operate in a controlled test environment.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-09T03:47:21.269Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: 0xDEnYO
PR: #819
File: deployments/polygon.json:0-0
Timestamp: 2024-10-04T09:21:59.708Z
Learning: Ensure that scripts used for codebase verification produce valid and accurate results before reporting issues, especially when checking Ethereum address checksums in deployments/polygon.json.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Test scripts thoroughly before deployment and update documentation when making changes.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest.ts:0-0
Timestamp: 2025-06-05T14:50:40.886Z
Learning: Demo scripts in this codebase can use hardcoded gas limits and other simplified values, as they prioritize demonstration clarity over production robustness.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: ezynda3
PR: #1124
File: script/demoScripts/demoPatcherDest_new.ts:0-0
Timestamp: 2025-06-05T14:25:19.137Z
Learning: Error handling for findNeedleOffset function calls is not needed in demo scripts in the lifinance/contracts repository, as indicated by the team's preference to keep demo scripts simpler.

Learnt from: 0xDEnYO
PR: #1208
File: test/solidity/utils/TestAMM.sol:18-22
Timestamp: 2025-06-15T08:47:22.079Z
Learning: For test contracts in the lifinance/contracts repository, simpler error handling approaches are acceptable and preferred over more complex error bubbling mechanisms, as the focus is on functionality rather than detailed error reporting.

Learnt from: ezynda3
PR: #1198
File: test/solidity/Helpers/SwapperV2.t.sol:50-69
Timestamp: 2025-06-19T10:42:55.379Z
Learning: Test code in Solidity (e.g., contracts in test/ directories) typically doesn't require the same level of input validation as production code, as tests are designed to validate specific scenarios with controlled inputs and may need to test edge cases.

script/deploy/safe/confirm-safe-tx.ts (28)

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: The submitAndExecuteTransaction function in Safe management scripts includes comprehensive error handling that covers transaction proposal, execution, and receipt verification. It uses try-catch blocks, verifies transaction receipt status, logs errors, and properly propagates them up the call stack, making additional error handling around its calls unnecessary.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/safe-utils.ts:1096-1142
Timestamp: 2025-07-17T04:38:42.425Z
Learning: In script/deploy/safe/safe-utils.ts, 0xDEnYO prefers to keep the getContractNameFromDeploymentLog function without explicit JSON structure validation, prioritizing code simplicity over comprehensive validation for deployment log parsing.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:334-334
Timestamp: 2025-07-17T04:21:55.549Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep private key processing simple in scripts like execute-pending-timelock-tx.ts without adding format validation, prioritizing code simplicity over strict validation in controlled environments.

Learnt from: 0xDEnYO
PR: #1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:129-129
Timestamp: 2025-07-17T04:21:50.790Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers not to add private key format validation in deployment scripts like execute-pending-timelock-tx.ts, prioritizing code simplicity over strict validation in their controlled environment.

Learnt from: 0xDEnYO
PR: #1015
File: script/deploy/safe/add-safe-owners-and-threshold.ts:117-123
Timestamp: 2025-02-20T04:50:33.488Z
Learning: In the Safe owners management scripts, error handling for transaction submission is implemented within the submitAndExecuteTransaction function, making additional try-catch blocks around its calls unnecessary.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:24:05.881Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, validation for network configuration when casting imported JSON data to NetworksObject is not required as per the user's preference.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:8-13
Timestamp: 2024-11-21T08:22:38.484Z
Learning: In script/deploy/safe/add-owners-to-safe.ts, runtime validation for network configuration using Zod is not required; type assertions are acceptable.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:50.099Z
Learning: In the script script/deploy/safe/add-owners-to-safe.ts, additional defensive checks for network configuration may be unnecessary because the script will fail anyway when the network configuration is missing.

Learnt from: 0xDEnYO
PR: #847
File: script/tasks/fundNewWalletOnAllChains.ts:179-187
Timestamp: 2024-11-04T03:50:06.443Z
Learning: In the script/tasks/fundNewWalletOnAllChains.ts file, adding a timeout to the transaction confirmation wait using publicClient.waitForTransactionReceipt is not required.

Learnt from: 0xDEnYO
PR: #1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Learnt from: CR
PR: lifinance/contracts#0
File: conventions.md:0-0
Timestamp: 2025-07-21T08:17:04.483Z
Learning: Applies to script/**/*.ts : All TypeScript scripts must use citty for CLI argument parsing.

Learnt from: mirooon
PR: #950
File: script/demoScripts/utils/demoScriptHelpers.ts:618-654
Timestamp: 2025-01-28T11:59:27.898Z
Learning: In the LiFi codebase, basic error details in console.error are sufficient for transaction failures, without the need for gas estimation or detailed error object destructuring.

Learnt from: ezynda3
PR: #861
File: script/deploy/safe/add-owners-to-safe.ts:48-48
Timestamp: 2024-11-21T08:23:39.984Z
Learning: In the script/deploy/safe/add-owners-to-safe.ts script, explicit error handling for missing network configuration is not required because the script will fail anyway if the network is not configured.

Learnt from: mirooon
PR: #945
File: script/demoScripts/demoGlacis.ts:180-189
Timestamp: 2025-01-30T10:38:18.041Z
Learning: The executeTransaction helper function in the LiFi codebase handles error cases and transaction logging comprehensively, including try/catch structures, transaction receipt validation, and detailed console logging for transaction status tracking.

Learnt from: 0xDEnYO
PR: #992
File: config/networks.json:650-667
Timestamp: 2025-02-13T10:10:58.521Z
Learning: The Safe transaction service endpoint for unichain (https://safe-transaction-unichain.safe.global/api) is correctly configured despite potential intermittent availability during testing.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:290-302
Timestamp: 2025-05-12T09:54:11.208Z
Learning: In the viem library, the publicClient.waitForTransactionReceipt function has a built-in default timeout of 180,000 milliseconds (3 minutes), making additional timeout handling mechanisms unnecessary unless a different timeout value is desired.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:290-302
Timestamp: 2025-05-12T09:54:11.208Z
Learning: In the viem library, the publicClient.waitForTransactionReceipt function has a built-in default timeout of 180,000 milliseconds (3 minutes), making additional timeout handling mechanisms unnecessary unless a different timeout value is desired.

Learnt from: mirooon
PR: #1057
File: script/deploy/safe/deploy-and-setup-safe.ts:39-90
Timestamp: 2025-03-20T15:41:47.322Z
Learning: When deploying a Gnosis Safe, the threshold value (number of required signatures) must never exceed the total number of owners. This validation should be added to any Safe deployment scripts to prevent configuration errors.

Learnt from: ezynda3
PR: #861
File: script/deploy/healthCheck.ts:387-388
Timestamp: 2024-11-21T08:24:22.802Z
Learning: In script/deploy/healthCheck.ts, handling the case when networkConfig is undefined is unnecessary because the code will fail anyway.

Learnt from: ezynda3
PR: #827
File: config/networks.json:448-448
Timestamp: 2024-11-22T08:50:28.878Z
Learning: In config/networks.json, Safe addresses (safeAddress fields) do not need to be verified, as they are handled separately.

Learnt from: 0xDEnYO
PR: #858
File: config/networks.json:17-17
Timestamp: 2024-11-18T07:19:28.651Z
Learning: In the config/networks.json file, it's expected that the safeWebUrl field may have different formats and URLs across networks; standardizing them is not desired.

Learnt from: mirooon
PR: #1283
File: config/networks.json:837-839
Timestamp: 2025-07-17T11:31:50.058Z
Learning: In config/networks.json for the Ronin network (chainId 2020), there is a problematic mismatch between verificationType ("blockscout") and explorerApiUrl ("https://sourcify.roninchain.com/server"). This inconsistency can lead to verification issues and should be flagged when networks.json is modified in future PRs.

Learnt from: 0xDEnYO
PR: #825
File: config/networks.json:462-462
Timestamp: 2024-10-11T22:01:09.826Z
Learning: In the networks.json file and related configuration files, when updating the name property of a network (e.g., from Scroll to zkScroll), the key of the network object should remain unchanged (e.g., 'scroll') to ensure it matches references elsewhere in the codebase.

Learnt from: 0xDEnYO
PR: #825
File: config/networks.json:462-462
Timestamp: 2024-10-08T07:14:52.296Z
Learning: In the networks.json file and related configuration files, when updating the name property of a network (e.g., from Scroll to zkScroll), the key of the network object should remain unchanged (e.g., 'scroll') to ensure it matches references elsewhere in the codebase.

Learnt from: ezynda3
PR: #861
File: config/global.json:146-146
Timestamp: 2024-11-21T08:34:30.300Z
Learning: The project is deprecating safeAddresses and safeApiUrls in global.json and moving these configurations to config/networks.json for network configurations.

Learnt from: ezynda3
PR: #875
File: config/amarok.json:111-116
Timestamp: 2024-11-26T07:14:08.986Z
Learning: For the Lisk chain (chainId 1135), it's acceptable to have an empty connextHandler, domain, and tokensToApprove in config/amarok.json even if networks.json marks Lisk as "status": "active".

Learnt from: 0xDEnYO
PR: #819
File: deployments/avalanche.diamond.json:105-105
Timestamp: 2024-10-04T09:17:19.275Z
Learning: In the lifinance/contracts repository, contracts may have different addresses across networks. Do not check if contracts have the same addresses across all networks in future reviews.

Learnt from: 0xDEnYO
PR: #819
File: deployments/avalanche.diamond.json:105-105
Timestamp: 2024-10-09T03:47:21.269Z
Learning: In the lifinance/contracts repository, contracts may have different addresses across networks. Do not check if contracts have the same addresses across all networks in future reviews.

🪛 Biome (1.9.4)
script/deploy/safe/confirm-safe-tx-utils.ts

[error] 132-132: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

script/deploy/safe/safe-decode-utils.test.ts

[error] 140-140: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🔇 Additional comments (20)
tsconfig.json (1)

19-20: Addition of bun-types is correct and improves editor support
Bringing Bun’s ambient types into the compilation context is the right move and is already backed by @types/bun in devDependencies. No further changes needed.

.husky/pre-commit (1)

49-50: Fixture directory correctly excluded from secret scanning
The added path prevents false positives on static fixture data—good call.

.github/workflows/test.yml (1)

61-62: Nicely integrates TypeScript tests into CI
The extra step runs after Forge tests and respects the Bun setup; nothing else to flag.

script/deploy/safe/fixtures/deployment-log.json (1)

1-11: Verify fixture addresses before merge
These addresses look production-like rather than obvious mocks. Please confirm they’re either test-net deployments or otherwise safe to publish; if they are main-net, double-check that no privileged keys are implied elsewhere.

conventions.md (1)

418-459: Documentation looks comprehensive and well-structured!

The new TypeScript test conventions are clearly defined and provide excellent guidance for maintaining consistency across the codebase. The requirements for using Bun's testing framework, file naming conventions, and test organization will help ensure high-quality test coverage.

script/deploy/safe/fixtures/sample-transactions.ts (1)

1-71: Well-structured test fixtures!

The sample transactions provide comprehensive coverage of various decoding scenarios including direct calls, timelock-wrapped transactions, unknown functions, and edge cases. The real-world example with GasZipFacet is particularly valuable for testing.

script/deploy/safe/safe-decode-utils.test.ts (1)

21-254: Excellent test coverage!

The test suite is comprehensive and well-structured, following the conventions perfectly. It covers all major scenarios including edge cases, error handling, and complex nested transaction decoding. The mock implementation for testing external API failures is particularly well done.

script/deploy/safe/confirm-safe-tx.test.ts (1)

21-365: Comprehensive utility function tests!

The test suite thoroughly covers all utility functions with excellent edge case handling. The organization by function and descriptive test names make it easy to understand the expected behavior. Great job following the testing conventions.

script/deploy/safe/safe-decode-utils.ts (1)

1-425: Excellent implementation of the decoding strategy!

The module implements a robust multi-layered approach to transaction decoding with proper fallback mechanisms. The code follows all TypeScript conventions including async/await usage, consola for logging, and comprehensive error handling. The recursive decoding with depth limiting is well implemented.

script/deploy/safe/confirm-safe-tx-utils.ts (3)

20-41: LGTM!

The function correctly validates the decoded transaction before extracting timelock details.


178-185: LGTM!

Clean implementation with proper type handling for different argument types.


192-207: LGTM!

Well-structured formatting function with clear labels for all Safe transaction fields.

script/deploy/safe/confirm-safe-tx.ts (8)

12-12: LGTM!

Good addition of proper typing for MongoDB Collection and the new utility imports.

Also applies to: 23-33


72-75: LGTM!

Appropriate use of @ts-expect-error for the BigInt serialization workaround.


83-176: Excellent refactoring of the nested timelock display logic!

The changes improve type safety by accepting IDecodedTransaction and properly handling pre-decoded nested calls. The error handling with instanceof Error pattern is consistent throughout.


194-194: Good type safety improvement!

Replacing any with Collection<ISafeTxDocument> provides better type checking.


235-241: Excellent error handling improvements!

The consistent use of instanceof Error pattern for safe error message extraction is a best practice that prevents runtime errors when handling non-Error objects.

Also applies to: 257-262, 307-337, 345-349


401-476: Well-structured refactoring of transaction decoding and display!

The use of the new decoding system with backward compatibility for viem decoding is thoughtful. The modular approach with utility functions improves maintainability.


479-523: Excellent use of the new formatting utilities!

The integration of formatSafeTransactionDetails with color-coded output significantly improves the user experience and code maintainability.


829-835: Good addition of network validation!

The checks for network existence and active status prevent processing invalid networks.

Remove 5 unused exports that were not imported anywhere:
- getNetworksToProcess() function
- getSafeInfo() function (replaced by getSafeInfoFromContract)
- ISafeSignature interface
- ISafeTransactionData interface
- retry() function

All tests still pass after removal.

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
@@ -0,0 +1,207 @@
// SPDX-License-Identifier: LGPL-3.0-only
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need a licence inside .ts files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed: 8e6a615

*/
export async function prepareNestedCallDisplay(
nested: IDecodedTransaction,
_chainId: number
Copy link
Contributor

Choose a reason for hiding this comment

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

I think _chainId param is not used anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed: 1cea39f

@@ -0,0 +1,11 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the purpose of this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All files in fixtures are used for the unit tests. They act as dummy data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Though after double checking, this was no longer being used in my tests. Removed: b32d112

ezynda3 and others added 4 commits July 24, 2025 10:34
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

4 participants