synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

    expect(toTokens.sort()).toEqual([
      'AVAX-1284',
      'AVAX-1666600000',
      'AVAX-43114',
      'AVAX-53935',
Severity: Major
Found in packages/synapse-interface/__tests__/getToTokens.test.ts and 1 other location - About 1 day to fix
packages/synapse-interface/__tests__/getFromTokens.test.ts on lines 36..231

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

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

Function TestToChainConfig has 226 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestToChainConfig(t *testing.T) {
    chainID := big.NewInt(1)

    tests := []struct {
        name      string
Severity: Major
Found in ethergo/backends/anvil/hardfork_test.go - About 1 day to fix

    Function TestChainGetters has 226 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func TestChainGetters(t *testing.T) {
        chainID := 1
        badChainID := 2
        usdcAddr := "0x123"
        cfgWithBase := relconfig.Config{
    Severity: Major
    Found in services/rfq/relayer/relconfig/config_test.go - About 1 day to fix

      Function APIFlow has 199 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const APIFlow = () => {
        return (
          <svg
            width="100%"
            viewBox="-240 0 480 120"
      Severity: Major
      Found in docs/bridge/src/components/APIFlow.tsx - About 7 hrs to fix

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

        export const UNIDX: BridgeableToken = {
          addresses: {
            [CHAINS.ETHEREUM.id]: '0xf0655dcee37e5c0b70fffd70d85f88f8edf0aff6',
            [CHAINS.ARBITRUM.id]: '0x5429706887FCb58a595677B73E9B0441C25d993D',
            [CHAINS.FANTOM.id]: '0x0483a76D80D0aFEC6bd2afd12C1AD865b9DF1471',
        Severity: Major
        Found in packages/rest-api/src/constants/bridgeable.ts and 4 other locations - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 205..228
        packages/widget/src/constants/bridgeable.ts on lines 205..228
        packages/widget/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 993..1016

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

        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 const USDCe: BridgeableToken = {
          addresses: {
            [CHAINS.OPTIMISM.id]: '0x7F5c764cBc14f9669B88837ca1490cCa17c31607',
            [CHAINS.AVALANCHE.id]: '0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664',
            [CHAINS.ARBITRUM.id]: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
        Severity: Major
        Found in packages/widget/src/constants/bridgeable.ts and 4 other locations - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 205..228
        packages/rest-api/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 205..228
        packages/widget/src/constants/bridgeable.ts on lines 379..402

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

        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 const UNIDX: BridgeableToken = {
          addresses: {
            [CHAINS.ETHEREUM.id]: '0xf0655dcee37e5c0b70fffd70d85f88f8edf0aff6',
            [CHAINS.ARBITRUM.id]: '0x5429706887FCb58a595677B73E9B0441C25d993D',
            [CHAINS.FANTOM.id]: '0x0483a76D80D0aFEC6bd2afd12C1AD865b9DF1471',
        Severity: Major
        Found in packages/widget/src/constants/bridgeable.ts and 4 other locations - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 205..228
        packages/rest-api/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 205..228
        packages/widget/src/constants/bridgeable.ts on lines 993..1016

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

        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 const SDT: BridgeableToken = {
          addresses: {
            [CHAINS.ETHEREUM.id]: '0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f',
            [CHAINS.AVALANCHE.id]: '0xCCBf7c451F81752F7d2237F2c18C371E6e089E69',
            [CHAINS.ARBITRUM.id]: '0x087d18A77465c34CDFd3a081a2504b7E86CE4EF8',
        Severity: Major
        Found in packages/widget/src/constants/bridgeable.ts and 4 other locations - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 205..228
        packages/rest-api/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 993..1016

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

        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 const SDT: BridgeableToken = {
          addresses: {
            [CHAINS.ETHEREUM.id]: '0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f',
            [CHAINS.AVALANCHE.id]: '0xCCBf7c451F81752F7d2237F2c18C371E6e089E69',
            [CHAINS.ARBITRUM.id]: '0x087d18A77465c34CDFd3a081a2504b7E86CE4EF8',
        Severity: Major
        Found in packages/rest-api/src/constants/bridgeable.ts and 4 other locations - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 205..228
        packages/widget/src/constants/bridgeable.ts on lines 379..402
        packages/widget/src/constants/bridgeable.ts on lines 993..1016

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

        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

        export const AVAX: BridgeableToken = {
          addresses: {
            [CHAINS.MOONBEAM.id]: '0xA1f8890E39b4d8E33efe296D698fe42Fb5e59cC3',
            [CHAINS.KLAYTN.id]: '0xCd8fE44A29Db9159dB36f96570d7A4d91986f528',
            [CHAINS.AVALANCHE.id]: ZeroAddress,
        Severity: Major
        Found in packages/widget/src/constants/bridgeable.ts and 1 other location - About 7 hrs to fix
        packages/rest-api/src/constants/bridgeable.ts on lines 856..879

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

        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

        export const AVAX: BridgeableToken = {
          addresses: {
            [CHAINS.MOONBEAM.id]: '0xA1f8890E39b4d8E33efe296D698fe42Fb5e59cC3',
            [CHAINS.KLAYTN.id]: '0xCd8fE44A29Db9159dB36f96570d7A4d91986f528',
            [CHAINS.AVALANCHE.id]: NativeTokenAddress,
        Severity: Major
        Found in packages/rest-api/src/constants/bridgeable.ts and 1 other location - About 7 hrs to fix
        packages/widget/src/constants/bridgeable.ts on lines 854..877

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

        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

        Method ScribeSuite.TestLivefillParity has 223 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (s *ScribeSuite) TestLivefillParity() {
            if os.Getenv("CI") != "" {
                s.T().Skip("Network test flake")
            }
            const blockRange = uint64(100)
        Severity: Major
        Found in services/scribe/service/scribe_test.go - About 7 hrs to fix

          Function Txs has 198 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const Txs = () => {
            const search = useSearchParams()
            const p = Number(search.get('p'))
            const hashSearch = String(search.get('hash'))
          
          
          Severity: Major
          Found in packages/explorer-ui/pages/txs/index.tsx - About 7 hrs to fix

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

            export const BLAST_ETH_SWAP_TOKEN = new Token({
              addresses: {
                [CHAINS.BLAST.id]: '0x1600084daCcd3b58ACeFcdb0F3D7c9649359116b',
              },
              decimals: 18,
            Severity: Major
            Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 1 other location - About 7 hrs to fix
            packages/synapse-interface/constants/tokens/poolMaster.ts on lines 839..868

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

            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

            export const BASE_ETH_SWAP_TOKEN = new Token({
              addresses: {
                [CHAINS.BASE.id]: '0xC35b09c8fdefc90ec580B327d32DeAAda4f581Da',
              },
              decimals: 18,
            Severity: Major
            Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 1 other location - About 7 hrs to fix
            packages/synapse-interface/constants/tokens/poolMaster.ts on lines 870..899

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

            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

            ILightInbox has 55 methods (exceeds 20 allowed). Consider refactoring.
            Open

            type ILightInbox struct {
                mock.Mock
            }
            Severity: Major
            Found in agents/contracts/lightinbox/mocks/i_light_inbox.go - About 7 hrs to fix

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

              package pingpongclient_test
              
              import (
                  "math/big"
                  "testing"
              Severity: Major
              Found in agents/contracts/test/pingpongclient/suite_test.go and 1 other location - About 7 hrs to fix
              agents/contracts/test/testclient/suite_test.go on lines 1..77

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

              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

              package testclient_test
              
              import (
                  "math/big"
                  "testing"
              Severity: Major
              Found in agents/contracts/test/testclient/suite_test.go and 1 other location - About 7 hrs to fix
              agents/contracts/test/pingpongclient/suite_test.go on lines 1..77

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

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

              package executor
              
              import (
                  "context"
                  "encoding/json"
              Severity: Minor
              Found in agents/agents/executor/executor.go - About 7 hrs to fix

                File resolvers.ts has 492 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { sql } from 'kysely'
                
                import { db } from '../db'
                
                // typical fields to return for a BridgeRequest
                Severity: Minor
                Found in packages/rfq-indexer/api/src/graphql/resolvers.ts - About 7 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language