synapsecns/sanguine

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

Summary

Maintainability
F
6 days
Test Coverage

File SynapseCCTPRouter.ts has 407 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
Severity: Minor
Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts - About 5 hrs to fix

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

      populateTransaction: {
        adapterSwap(
          recipient: string,
          tokenIn: string,
          amountIn: BigNumberish,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 1 other location - About 1 day to fix
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 364..412

    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 341.

    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: {
        adapterSwap(
          recipient: string,
          tokenIn: string,
          amountIn: BigNumberish,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 1 other location - About 1 day to fix
    packages/sdk-router/src/typechain/SynapseCCTPRouter.ts on lines 414..465

    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 341.

    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(
          token: string,
          overrides?: CallOverrides
        ): Promise<
          [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.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/SynapseCCTP.ts on lines 914..924
    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(
          token: string,
          overrides?: CallOverrides
        ): Promise<
          [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.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/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

    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(
        token: string,
        overrides?: CallOverrides
      ): Promise<
        [number, BigNumber, BigNumber, BigNumber] & {
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.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/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 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/SynapseCCTPRouter.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/SynapseCCTP.ts on lines 526..530
    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 5 locations. Consider refactoring.
    Open

    export type SwapQueryStructOutput = [
      string,
      string,
      BigNumber,
      BigNumber,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 4 other locations - About 1 hr to fix
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 38..50
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 57..69
    packages/synapse-constants/src/types/index.ts on lines 34..40
    packages/synapse-interface/utils/types/index.tsx on lines 37..43

    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 3 locations. Consider refactoring.
    Open

        getOriginAmountOut(
          tokenIn: string,
          tokenSymbols: string[],
          amountIn: BigNumberish,
          overrides?: CallOverrides
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 2 other locations - About 1 hr to fix
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 242..249
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 607..614

    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

        bridge(
          recipient: string,
          chainId: BigNumberish,
          token: string,
          amount: BigNumberish,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.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/SynapseCCTP.ts on lines 977..985
    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

        getDestinationAmountOut(
          requests: DestRequestStruct[],
          tokenOut: string,
          overrides?: CallOverrides
        ): Promise<
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 1 other location - About 1 hr to fix
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 599..605

    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 56.

    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/SynapseCCTPRouter.ts and 1 other location - About 1 hr to fix
    packages/sdk-router/src/typechain/SynapseCCTP.ts on lines 562..567

    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

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

        adapterSwap(
          recipient: string,
          tokenIn: string,
          amountIn: BigNumberish,
          tokenOut: string,
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 2 other locations - About 50 mins to fix
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 331..338
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 901..908

    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 52.

    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 3 locations. Consider refactoring.
    Open

    export type SwapQueryStruct = {
      routerAdapter: string
      tokenOut: string
      minAmountOut: BigNumberish
      deadline: BigNumberish
    Severity: Major
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 2 other locations - About 45 mins to fix
    packages/sdk-router/src/typechain/FastBridgeRouter.ts on lines 30..36
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 49..55

    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 50.

    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 3 locations. Consider refactoring.
    Open

        getConnectedBridgeTokens(
          tokenOut: string,
          overrides?: CallOverrides
        ): Promise<
          [BridgeTokenStructOutput[]] & { tokens: BridgeTokenStructOutput[] }
    Severity: Minor
    Found in packages/sdk-router/src/typechain/SynapseCCTPRouter.ts and 2 other locations - About 35 mins to fix
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 592..597
    packages/sdk-router/src/typechain/SynapseRouter.ts on lines 632..635

    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 47.

    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