synapsecns/sanguine

View on GitHub
packages/sdk-router/src/typechain/SynapseCCTP.ts

Summary

Maintainability
F
2 wks
Test Coverage

File SynapseCCTP.ts has 1248 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
Severity: Major
Found in packages/sdk-router/src/typechain/SynapseCCTP.ts - About 3 days to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      populateTransaction: {
        accumulatedFees(
          arg0: string,
          arg1: string,
          overrides?: CallOverrides
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 1 other location - About 1 wk to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 1139..1294

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1283.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      estimateGas: {
        accumulatedFees(
          arg0: string,
          arg1: string,
          overrides?: CallOverrides
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 1 other location - About 1 wk to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 1296..1467

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1283.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        feeStructures(
          arg0: string,
          overrides?: CallOverrides
        ): Promise<
          [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 5 other locations - About 2 hrs to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 747..757
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 914..924
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 205..215
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 270..280
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 329..339

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 75.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        feeStructures(
          arg0: string,
          overrides?: CallOverrides
        ): Promise<
          [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 5 other locations - About 2 hrs to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 573..583
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 747..757
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 205..215
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 270..280
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 329..339

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 75.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

      feeStructures(
        arg0: string,
        overrides?: CallOverrides
      ): Promise<
        [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 5 other locations - About 2 hrs to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 573..583
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 914..924
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 205..215
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 270..280
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 329..339

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 75.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

      queryFilter<TEvent extends TypedEvent>(
        event: TypedEventFilter<TEvent>,
        fromBlockOrBlockhash?: string | number | undefined,
        toBlock?: string | number | undefined
      ): Promise<Array<TEvent>>
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 5 other locations - About 1 hr to fix
    packages/sdk-router/src/typechain/FastBridge.ts on lines 700..704
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 199..203
    packages/sdk-router/src/typechain/SynapseBridge.ts on lines 642..646
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 159..163
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 469..473

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        sendCircleToken(
          recipient: string,
          chainId: BigNumberish,
          burnToken: string,
          amount: BigNumberish,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 3 other locations - About 1 hr to fix
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 340..348
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 312..320
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 928..936

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        calculateFeeAmount(
          token: string,
          amount: BigNumberish,
          isSwap: boolean,
          overrides?: CallOverrides
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 1 other location - About 1 hr to fix
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 198..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

      remoteDomainConfig(
        arg0: BigNumberish,
        overrides?: CallOverrides
      ): Promise<[number, string] & { domain: number; synapseCCTP: string }>
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 2 other locations - About 40 mins to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 629..632
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 966..969

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 49.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        remoteDomainConfig(
          arg0: BigNumberish,
          overrides?: CallOverrides
        ): Promise<[number, string] & { domain: number; synapseCCTP: string }>
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 2 other locations - About 40 mins to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 796..799
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 966..969

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 49.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        remoteDomainConfig(
          arg0: BigNumberish,
          overrides?: CallOverrides
        ): Promise<[number, string] & { domain: number; synapseCCTP: string }>
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTP.ts and 2 other locations - About 40 mins to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 629..632
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 796..799

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 49.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status