synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const getFromTokens = ({
  fromChainId,
  fromTokenRouteSymbol,
  toChainId,
  toTokenRouteSymbol,
Severity: Major
Found in packages/widget/src/utils/routeMaker/getFromTokens.ts and 2 other locations - About 1 wk to fix
packages/synapse-interface/utils/routeMaker/getFromTokens.ts on lines 7..235
packages/synapse-interface/utils/swapFinder/getSwapFromTokens.ts on lines 7..235

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

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

File mockRoutes.ts has 3429 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export const mockRoutes = {
  'AVAX-1284': [
    'AVAX-8217',
    'WAVAX-43114',
    'AVAX-43114',
Severity: Major
Found in packages/synapse-interface/__tests__/__fixtures__/mockRoutes.ts - About 1 wk to fix

    executionContext has 475 methods (exceeds 20 allowed). Consider refactoring.
    Open

    type executionContext struct {
        *graphql.OperationContext
        *executableSchema
        deferred        int32
        pendingDeferred int32
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 wk to fix

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

        populateTransaction: {
          DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<PopulatedTransaction>
      
          GOVERNANCE_ROLE(overrides?: CallOverrides): Promise<PopulatedTransaction>
      
      
      Severity: Major
      Found in packages/sdk-router/src/typechain/SynapseBridge.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/SynapseBridge.ts on lines 1464..1655

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

      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: {
          DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<BigNumber>
      
          GOVERNANCE_ROLE(overrides?: CallOverrides): Promise<BigNumber>
      
      
      Severity: Major
      Found in packages/sdk-router/src/typechain/SynapseBridge.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/SynapseBridge.ts on lines 1657..1860

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

      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

      export const getToTokens = ({
        fromChainId,
        fromTokenRouteSymbol,
        toChainId,
        toTokenRouteSymbol,
      Severity: Major
      Found in packages/widget/src/utils/routeMaker/getToTokens.ts and 1 other location - About 1 wk to fix
      packages/synapse-interface/utils/routeMaker/getToTokens.ts on lines 6..215

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

      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

      export const getToTokens = ({
        fromChainId,
        fromTokenRouteSymbol,
        toChainId,
        toTokenRouteSymbol,
      Severity: Major
      Found in packages/synapse-interface/utils/routeMaker/getToTokens.ts and 1 other location - About 1 wk to fix
      packages/widget/src/utils/routeMaker/getToTokens.ts on lines 6..215

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

      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(
            to: string,
            tokenIn: string,
            amountIn: BigNumberish,
      Severity: Major
      Found in packages/sdk-router/src/typechain/SynapseRouter.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/SynapseRouter.ts on lines 1278..1471

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

      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

        populateTransaction: {
          adapterSwap(
            to: string,
            tokenIn: string,
            amountIn: BigNumberish,
      Severity: Major
      Found in packages/sdk-router/src/typechain/SynapseRouter.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/SynapseRouter.ts on lines 1098..1276

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

      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: {
          DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<BigNumber>
      
          DISPUTE_PERIOD(overrides?: CallOverrides): Promise<BigNumber>
      
      
      Severity: Major
      Found in packages/sdk-router/src/typechain/FastBridge.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/FastBridge.ts on lines 1497..1666

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

      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

        populateTransaction: {
          DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<PopulatedTransaction>
      
          DISPUTE_PERIOD(overrides?: CallOverrides): Promise<PopulatedTransaction>
      
      
      Severity: Major
      Found in packages/sdk-router/src/typechain/FastBridge.ts and 1 other location - About 1 wk to fix
      packages/sdk-router/src/typechain/FastBridge.ts on lines 1340..1495

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

      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

        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

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

      export const RFQFlow = () => {
        return (
          <svg
            width="100%"
            viewBox="-240 0 480 224"
      Severity: Major
      Found in docs/bridge/src/components/RFQFlow.tsx and 1 other location - About 1 wk to fix
      docs/bridge/blog-posts/RFQFlow.tsx on lines 1..185

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

      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

      export const RFQFlow = () => {
        return (
          <svg
            width="100%"
            viewBox="-240 0 480 224"
      Severity: Major
      Found in docs/bridge/blog-posts/RFQFlow.tsx and 1 other location - About 1 wk to fix
      docs/bridge/src/components/RFQFlow.tsx on lines 1..185

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

      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

      executionContext has 298 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type executionContext struct {
          *graphql.OperationContext
          *executableSchema
          deferred        int32
          pendingDeferred int32
      Severity: Major
      Found in services/explorer/consumer/client/resolver-client/server.go - About 6 days to fix

        executionContext has 298 methods (exceeds 20 allowed). Consider refactoring.
        Open

        type executionContext struct {
            *graphql.OperationContext
            *executableSchema
            deferred        int32
            pendingDeferred int32
        Severity: Major
        Found in services/scribe/graphql/server/graph/resolver/server.go - About 6 days to fix

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

              if (isIndefinite) {
                duration = 'infinite'
                return (
                  <svg
                    id="linear-animated-progress-bar"
          packages/widget/src/components/Maintenance/LinearAnimatedProgressBar.tsx on lines 34..177

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

          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

              if (isIndefinite) {
                duration = 'infinite'
                return (
                  <svg
                    id="linear-animated-progress-bar"
          packages/synapse-interface/components/Maintenance/components/LinearAnimatedProgressBar.tsx on lines 33..176

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

          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

          File bridgeMap.ts has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          export const BRIDGE_MAP = {
            '1': {
              '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
                decimals: 18,
                symbol: 'H2O',
          Severity: Major
          Found in packages/synapse-interface/constants/bridgeMap.ts - About 5 days to fix
            Severity
            Category
            Status
            Source
            Language