synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

      it('Does not filter zero amount queries', async () => {
        const originQueries = await synapseRouter.getOriginQueries(
          ETH_USDC,
          ['USDC', 'fakeSymbol'],
          BigNumber.from(10).pow(9)
Severity: Major
Found in packages/sdk-router/src/router/synapseRouter.test.ts and 1 other location - About 7 hrs to fix
packages/sdk-router/src/router/synapseCCTPRouter.test.ts on lines 115..126

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

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 executeBridge has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const executeBridge = async () => {
    let pendingPopup: any

    const currentTimestamp: number = getUnixTimeMinutesFromNow(0)

Severity: Major
Found in packages/synapse-interface/pages/state-managed-bridge/index.tsx - About 7 hrs to fix

    File client.go has 707 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    // Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.
    
    package client
    
    import (
    Severity: Minor
    Found in services/explorer/graphql/client/client.go - About 7 hrs to fix

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

      package origin
      
      import (
          "fmt"
          "github.com/ethereum/go-ethereum/common"
      Severity: Major
      Found in agents/contracts/origin/parser.go and 1 other location - About 6 hrs to fix
      agents/contracts/summit/parser.go on lines 1..75

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

      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 summit
      
      import (
          "fmt"
      
      
      Severity: Major
      Found in agents/contracts/summit/parser.go and 1 other location - About 6 hrs to fix
      agents/contracts/origin/parser.go on lines 1..74

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

      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

      func (x *IndexerSuite) TestTxTypeNotSupported() {
          if os.Getenv("CI") != "" {
              x.T().Skip("Network test flake")
          }
      
      
      Severity: Major
      Found in services/scribe/service/indexer/indexer_test.go and 1 other location - About 6 hrs to fix
      services/scribe/service/indexer/indexer_test.go on lines 512..555

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

      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

      func (x IndexerSuite) TestInvalidTxVRS() {
          if os.Getenv("CI") != "" {
              x.T().Skip("Network test flake")
          }
      
      
      Severity: Major
      Found in services/scribe/service/indexer/indexer_test.go and 1 other location - About 6 hrs to fix
      services/scribe/service/indexer/indexer_test.go on lines 464..507

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

      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

                      <div className="flex gap-x-[1.8rem] py-1">
                        <p className="w-24 text-white text-opacity-60">From Txn</p>
                        {fromInfo ? (
                          <a
                            target="_blank"
      Severity: Major
      Found in packages/explorer-ui/pages/tx/[kappa].tsx and 1 other location - About 6 hrs to fix
      packages/explorer-ui/pages/tx/[kappa].tsx on lines 248..269

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

      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

                      <div className="flex gap-x-[1.8rem] py-1">
                        <p className="w-24 text-white text-opacity-60">Dest Txn</p>
                        {toInfo ? (
                          <a
                            target="_blank"
      Severity: Major
      Found in packages/explorer-ui/pages/tx/[kappa].tsx and 1 other location - About 6 hrs to fix
      packages/explorer-ui/pages/tx/[kappa].tsx on lines 225..246

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

      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

      Chain has 49 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type Chain struct {
          mock.Mock
      }
      Severity: Minor
      Found in ethergo/chain/mocks/chain.go - About 6 hrs to fix

        File networks.ts has 451 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { CHAINS } from '@synapsecns/synapse-constants'
        
        const ChainId = CHAINS.ChainId
        
        const ETH_CURRENCY_TEXT_CLASSNAME = 'text-[#5170ad] dark:text-[#78a5ff]'
        Severity: Minor
        Found in packages/explorer-ui/utils/styles/networks.ts - About 6 hrs to fix

          Method ExecutorSuite.TestSendManagerMessage has 195 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (e *ExecutorSuite) TestSendManagerMessage() {
              // This test requires a call to anvil's evm.IncreaseTime() cheat code, so we should
              // set up the backends with anvil.
          
              testDone := false
          Severity: Major
          Found in agents/agents/executor/executor_test.go - About 6 hrs to fix

            File getters.go has 698 lines of code (exceeds 500 allowed). Consider refactoring.
            Open

            package relconfig
            
            import (
                "fmt"
                "math/big"
            Severity: Minor
            Found in services/rfq/relayer/relconfig/getters.go - About 6 hrs to fix

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

              export const HARMONY_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.HARMONY.id]: '0xE269abBFAF52b26D2632F55B6b223A5223088B96',
                },
                decimals: 18,
              Severity: Major
              Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 69..94
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 146..171
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 221..246
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 248..273
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 302..327

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

              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

              export const BSC_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.BNB.id]: '0xa4b7Bc06EC817785170C2DbC1dD3ff86CDcdcc4C',
                },
                decimals: 18,
              Severity: Major
              Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 146..171
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 221..246
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 248..273
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 275..300
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 302..327

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

              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

              export const FANTOM_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.FANTOM.id]: '0x464d121D3cA63cEEfd390D76f19364D3Bd024cD2',
                },
                decimals: 18,
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 66..91
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 143..168
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 219..244
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 273..298
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 300..325

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

              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

              export const BSC_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.BNB.id]: '0xa4b7Bc06EC817785170C2DbC1dD3ff86CDcdcc4C',
                },
                decimals: 18,
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 143..168
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 219..244
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 246..271
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 273..298
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 300..325

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

              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

              export const FANTOM_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.FANTOM.id]: '0x464d121D3cA63cEEfd390D76f19364D3Bd024cD2',
                },
                decimals: 18,
              Severity: Major
              Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 69..94
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 146..171
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 221..246
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 275..300
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 302..327

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

              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

              export const BOBA_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.BOBA.id]: '0x9D7283A6AeeD9BCd4Ac70876fEA2b69a63DD8cb9',
                },
                decimals: 18,
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 66..91
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 143..168
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 219..244
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 246..271
              packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 273..298

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

              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

              export const ARBITRUM_POOL_SWAP_TOKEN = new Token({
                addresses: {
                  [CHAINS.ARBITRUM.id]: '0xADeac0343C2Ac62DFE5A5f51E896AefFF5Ab513E',
                },
                decimals: 18,
              Severity: Major
              Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 69..94
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 146..171
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 248..273
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 275..300
              packages/synapse-interface/constants/tokens/poolMaster.ts on lines 302..327

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

              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

              Severity
              Category
              Status
              Source
              Language