synapsecns/sanguine

View on GitHub

Showing 13,064 of 13,064 total issues

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

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package resolvers

import (
Severity: Major
Found in services/scribe/graphql/server/graph/resolver/server.go and 1 other location - About 7 mos to fix
services/explorer/consumer/client/resolver-client/server.go on lines 1..9897

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

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

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package resolvers

import (
Severity: Major
Found in services/explorer/consumer/client/resolver-client/server.go and 1 other location - About 7 mos to fix
services/scribe/graphql/server/graph/resolver/server.go on lines 1..9897

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

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 BRIDGE_MAP = {
  '1': {
    '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
      decimals: 18,
      symbol: 'H2O',
Severity: Major
Found in packages/synapse-constants/constants/bridgeMap.ts and 1 other location - About 1 mo to fix
packages/synapse-constants/constants/tokens/bridgeMap.ts on lines 1..1889

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

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 BRIDGE_MAP = {
  '1': {
    '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
      decimals: 18,
      symbol: 'H2O',
Severity: Major
Found in packages/synapse-constants/constants/tokens/bridgeMap.ts and 1 other location - About 1 mo to fix
packages/synapse-constants/constants/bridgeMap.ts on lines 1..1889

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

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 server.go has 12003 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package resolvers

import (
Severity: Major
Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 mo to fix

    File server.go has 9187 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
    
    package resolvers
    
    import (
    Severity: Major
    Found in services/explorer/consumer/client/resolver-client/server.go - About 3 wks to fix

      File server.go has 9187 lines of code (exceeds 500 allowed). Consider refactoring.
      Open

      // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
      
      package resolvers
      
      import (
      Severity: Major
      Found in services/scribe/graphql/server/graph/resolver/server.go - About 3 wks to fix

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

        // Code generated by mockery v2.14.0. DO NOT EDIT.
        
        package mocks
        
        import (
        Severity: Major
        Found in ethergo/chain/client/mocks/evm_client.go and 1 other location - About 2 wks to fix
        ethergo/client/mocks/evm.go on lines 1..813

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

        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

        // Code generated by mockery v2.14.0. DO NOT EDIT.
        
        package mocks
        
        import (
        Severity: Major
        Found in ethergo/client/mocks/evm.go and 1 other location - About 2 wks to fix
        ethergo/chain/client/mocks/evm_client.go on lines 1..813

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

        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 messagetransmitter.abigen.go has 6550 lines of code (exceeds 500 allowed). Consider refactoring.
        Open

        // Code generated - DO NOT EDIT.
        // This file is a generated binding and any manual changes will be lost.
        
        package messagetransmitter
        
        

          File cctp.abigen.go has 6428 lines of code (exceeds 500 allowed). Consider refactoring.
          Open

          // Code generated - DO NOT EDIT.
          // This file is a generated binding and any manual changes will be lost.
          
          package cctp
          
          
          Severity: Major
          Found in services/cctp-relayer/contracts/cctp/cctp.abigen.go - About 2 wks to fix

            File testmessagebus.abigen.go has 4896 lines of code (exceeds 500 allowed). Consider refactoring.
            Open

            // Code generated - DO NOT EDIT.
            // This file is a generated binding and any manual changes will be lost.
            
            package testmessagebus
            
            

              File tokenmessenger.abigen.go has 4744 lines of code (exceeds 500 allowed). Consider refactoring.
              Open

              // Code generated - DO NOT EDIT.
              // This file is a generated binding and any manual changes will be lost.
              
              package tokenmessenger
              
              

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

                export const getFromChainIds = ({
                  fromChainId,
                  fromTokenRouteSymbol,
                  toChainId,
                  toTokenRouteSymbol,
                Severity: Major
                Found in packages/widget/src/utils/routeMaker/getFromChainIds.ts and 2 other locations - About 1 wk to fix
                packages/synapse-interface/utils/routeMaker/getFromChainIds.ts on lines 15..286
                packages/synapse-interface/utils/swapFinder/getSwapFromChainIds.ts on lines 12..283

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

                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 const getFromChainIds = ({
                  fromChainId,
                  fromTokenRouteSymbol,
                  toChainId,
                  toTokenRouteSymbol,
                packages/synapse-interface/utils/swapFinder/getSwapFromChainIds.ts on lines 12..283
                packages/widget/src/utils/routeMaker/getFromChainIds.ts on lines 15..286

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

                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 const getSwapFromChainIds = ({
                  fromChainId,
                  fromTokenRouteSymbol,
                  toChainId,
                  toTokenRouteSymbol,
                packages/synapse-interface/utils/routeMaker/getFromChainIds.ts on lines 15..286
                packages/widget/src/utils/routeMaker/getFromChainIds.ts on lines 15..286

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

                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 getToChainIds = ({
                  fromChainId,
                  fromTokenRouteSymbol,
                  toChainId,
                  toTokenRouteSymbol,
                packages/widget/src/utils/routeMaker/getToChainIds.ts on lines 16..273

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

                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 getToChainIds = ({
                  fromChainId,
                  fromTokenRouteSymbol,
                  toChainId,
                  toTokenRouteSymbol,
                Severity: Major
                Found in packages/widget/src/utils/routeMaker/getToChainIds.ts and 1 other location - About 1 wk to fix
                packages/synapse-interface/utils/routeMaker/getToChainIds.ts on lines 16..273

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

                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 gasoracle.abigen.go has 4449 lines of code (exceeds 500 allowed). Consider refactoring.
                Open

                // Code generated - DO NOT EDIT.
                // This file is a generated binding and any manual changes will be lost.
                
                package gasoracle
                
                
                Severity: Major
                Found in agents/contracts/gasoracle/gasoracle.abigen.go - About 1 wk to fix

                  File models.gen.go has 4264 lines of code (exceeds 500 allowed). Consider refactoring.
                  Open

                  // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
                  
                  package dfk
                  
                  import (
                  Severity: Major
                  Found in contrib/promexporter/internal/gql/dfk/models.gen.go - About 1 wk to fix
                    Severity
                    Category
                    Status
                    Source
                    Language