synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const WSOHM: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0xCa76543Cf381ebBB277bE79574059e32108e3E65',
    [CHAINS.ARBITRUM.id]: '0x30bD4e574a15994B35EF9C7a5bc29002F1224821',
    [CHAINS.AVALANCHE.id]: '0x240E332Cd26AaE10622B24160D23425A17256F5d',
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 15 other locations - About 5 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 83..102
packages/rest-api/src/constants/bridgeable.ts on lines 123..142
packages/rest-api/src/constants/bridgeable.ts on lines 230..249
packages/rest-api/src/constants/bridgeable.ts on lines 358..377
packages/rest-api/src/constants/bridgeable.ts on lines 553..572
packages/rest-api/src/constants/bridgeable.ts on lines 659..678
packages/rest-api/src/constants/bridgeable.ts on lines 1130..1149
packages/widget/src/constants/bridgeable.ts on lines 83..102
packages/widget/src/constants/bridgeable.ts on lines 123..142
packages/widget/src/constants/bridgeable.ts on lines 230..249
packages/widget/src/constants/bridgeable.ts on lines 358..377
packages/widget/src/constants/bridgeable.ts on lines 553..572
packages/widget/src/constants/bridgeable.ts on lines 659..678
packages/widget/src/constants/bridgeable.ts on lines 1054..1073
packages/widget/src/constants/bridgeable.ts on lines 1126..1145

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

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

export const FRAX: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0x853d955acef822db058eb8505911ed77f175b99e',
    [CHAINS.ARBITRUM.id]: '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
    [CHAINS.DOGE.id]: '0x10D70831f9C3c11c5fe683b2f1Be334503880DB6',
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 15 other locations - About 5 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 83..102
packages/rest-api/src/constants/bridgeable.ts on lines 123..142
packages/rest-api/src/constants/bridgeable.ts on lines 230..249
packages/rest-api/src/constants/bridgeable.ts on lines 358..377
packages/rest-api/src/constants/bridgeable.ts on lines 553..572
packages/rest-api/src/constants/bridgeable.ts on lines 659..678
packages/rest-api/src/constants/bridgeable.ts on lines 1058..1077
packages/rest-api/src/constants/bridgeable.ts on lines 1130..1149
packages/widget/src/constants/bridgeable.ts on lines 83..102
packages/widget/src/constants/bridgeable.ts on lines 123..142
packages/widget/src/constants/bridgeable.ts on lines 230..249
packages/widget/src/constants/bridgeable.ts on lines 358..377
packages/widget/src/constants/bridgeable.ts on lines 553..572
packages/widget/src/constants/bridgeable.ts on lines 1054..1073
packages/widget/src/constants/bridgeable.ts on lines 1126..1145

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

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

export const DOG: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0xBAac2B4491727D78D2b78815144570b9f2Fe8899',
    [CHAINS.BNBCHAIN.id]: '0xaa88c603d142c371ea0eac8756123c5805edee03',
    [CHAINS.POLYGON.id]: '0xeEe3371B89FC43Ea970E908536Fcddd975135D8a',
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 15 other locations - About 5 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 83..102
packages/rest-api/src/constants/bridgeable.ts on lines 230..249
packages/rest-api/src/constants/bridgeable.ts on lines 358..377
packages/rest-api/src/constants/bridgeable.ts on lines 553..572
packages/rest-api/src/constants/bridgeable.ts on lines 659..678
packages/rest-api/src/constants/bridgeable.ts on lines 1058..1077
packages/rest-api/src/constants/bridgeable.ts on lines 1130..1149
packages/widget/src/constants/bridgeable.ts on lines 83..102
packages/widget/src/constants/bridgeable.ts on lines 123..142
packages/widget/src/constants/bridgeable.ts on lines 230..249
packages/widget/src/constants/bridgeable.ts on lines 358..377
packages/widget/src/constants/bridgeable.ts on lines 553..572
packages/widget/src/constants/bridgeable.ts on lines 659..678
packages/widget/src/constants/bridgeable.ts on lines 1054..1073
packages/widget/src/constants/bridgeable.ts on lines 1126..1145

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

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

export const JUMP: BridgeableToken = {
  addresses: {
    [CHAINS.BNBCHAIN.id]: '0x130025ee738a66e691e6a7a62381cb33c6d9ae83',
    [CHAINS.FANTOM.id]: '0x78DE9326792ce1d6eCA0c978753c6953Cdeedd73',
    [CHAINS.METIS.id]: '0xE3c82A836Ec85311a433fBd9486EfAF4b1AFbF48',
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 15 other locations - About 5 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 83..102
packages/rest-api/src/constants/bridgeable.ts on lines 123..142
packages/rest-api/src/constants/bridgeable.ts on lines 230..249
packages/rest-api/src/constants/bridgeable.ts on lines 358..377
packages/rest-api/src/constants/bridgeable.ts on lines 553..572
packages/rest-api/src/constants/bridgeable.ts on lines 659..678
packages/rest-api/src/constants/bridgeable.ts on lines 1058..1077
packages/rest-api/src/constants/bridgeable.ts on lines 1130..1149
packages/widget/src/constants/bridgeable.ts on lines 123..142
packages/widget/src/constants/bridgeable.ts on lines 230..249
packages/widget/src/constants/bridgeable.ts on lines 358..377
packages/widget/src/constants/bridgeable.ts on lines 553..572
packages/widget/src/constants/bridgeable.ts on lines 659..678
packages/widget/src/constants/bridgeable.ts on lines 1054..1073
packages/widget/src/constants/bridgeable.ts on lines 1126..1145

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

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

export const DOG: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0xBAac2B4491727D78D2b78815144570b9f2Fe8899',
    [CHAINS.BNBCHAIN.id]: '0xaa88c603d142c371ea0eac8756123c5805edee03',
    [CHAINS.POLYGON.id]: '0xeEe3371B89FC43Ea970E908536Fcddd975135D8a',
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 15 other locations - About 5 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 83..102
packages/rest-api/src/constants/bridgeable.ts on lines 123..142
packages/rest-api/src/constants/bridgeable.ts on lines 230..249
packages/rest-api/src/constants/bridgeable.ts on lines 358..377
packages/rest-api/src/constants/bridgeable.ts on lines 553..572
packages/rest-api/src/constants/bridgeable.ts on lines 659..678
packages/rest-api/src/constants/bridgeable.ts on lines 1058..1077
packages/rest-api/src/constants/bridgeable.ts on lines 1130..1149
packages/widget/src/constants/bridgeable.ts on lines 83..102
packages/widget/src/constants/bridgeable.ts on lines 230..249
packages/widget/src/constants/bridgeable.ts on lines 358..377
packages/widget/src/constants/bridgeable.ts on lines 553..572
packages/widget/src/constants/bridgeable.ts on lines 659..678
packages/widget/src/constants/bridgeable.ts on lines 1054..1073
packages/widget/src/constants/bridgeable.ts on lines 1126..1145

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

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 (_m *IInbox) SubmitStateReportWithSnapshotProof(opts *bind.TransactOpts, stateIndex uint8, statePayload []byte, srSignature []byte, snapProof [][32]byte, attPayload []byte, attSignature []byte) (*types.Transaction, error) {
    ret := _m.Called(opts, stateIndex, statePayload, srSignature, snapProof, attPayload, attSignature)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, uint8, []byte, []byte, [][32]byte, []byte, []byte) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/inbox/mocks/i_inbox.go and 1 other location - About 5 hrs to fix
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 855..875

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

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 (_m *ILightInbox) SubmitStateReportWithSnapshotProof(opts *bind.TransactOpts, stateIndex uint8, statePayload []byte, srSignature []byte, snapProof [][32]byte, attPayload []byte, attSignature []byte) (*types.Transaction, error) {
    ret := _m.Called(opts, stateIndex, statePayload, srSignature, snapProof, attPayload, attSignature)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, uint8, []byte, []byte, [][32]byte, []byte, []byte) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/lightinbox/mocks/i_light_inbox.go and 1 other location - About 5 hrs to fix
agents/contracts/inbox/mocks/i_inbox.go on lines 1085..1105

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

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

      const query = db
        .with('deposits', () => qDeposits())
        .with('relays', () => qRelays())
        .with('refunds', () => qRefunds())
        .with('combined', (qb) =>
Severity: Major
Found in packages/rfq-indexer/api/src/graphql/resolvers.ts and 1 other location - About 5 hrs to fix
packages/rfq-indexer/api/src/controllers/refundedAndRelayedController.ts on lines 12..27

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

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

    const query = db
      .with('deposits', () => qDeposits())
      .with('relays', () => qRelays())
      .with('refunds', () => qRefunds())
      .with('combined', (qb) =>
packages/rfq-indexer/api/src/graphql/resolvers.ts on lines 396..415

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

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 mysql provides a common interface for starting mysql databases
package mysql

import (
    "context"
Severity: Major
Found in services/rfq/guard/guarddb/mysql/mysql.go and 1 other location - About 5 hrs to fix
services/rfq/relayer/reldb/mysql/mysql.go on lines 1..63

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

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 mysql provides a common interface for starting sql-lite databases
package mysql

import (
    "context"
Severity: Major
Found in services/rfq/relayer/reldb/mysql/mysql.go and 1 other location - About 5 hrs to fix
services/rfq/guard/guarddb/mysql/mysql.go on lines 1..63

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

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 SubmitterSuite.TestSetGasPrice has 157 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *SubmitterSuite) TestSetGasPrice() {
    wall, err := wallet.FromRandom()
    s.Require().NoError(err)

    signer := localsigner.NewSigner(wall.PrivateKey())
Severity: Major
Found in ethergo/submitter/submitter_test.go - About 5 hrs to fix

    Function BridgeTransactionButton has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

    export const BridgeTransactionButton = ({
      approveTxn,
      executeBridge,
      isApproved,
      isBridgePaused,

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    export const WBTC = new Token({
      addresses: {
        [CHAINS.ETH.id]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
        [CHAINS.KLAYTN.id]: '0xDCbacF3f7a069922E677912998c8d57423C37dfA',
        [CHAINS.DOGE.id]: '0xD0c6179c43C00221915f1a61f8eC06A5Aa32F9EC',
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 1 other location - About 5 hrs to fix
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 980..998

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

    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 BTCB = new Token({
      addresses: {
        [CHAINS.KLAYTN.id]: '0xe82f87ba4E97b2796aA0Fa4eFB06e8f0d2EB4FE1',
        [CHAINS.AVALANCHE.id]: '0x152b9d0FdC40C096757F570A51E494bd4b943E50',
        [CHAINS.DFK.id]: '0x7516EB8B8Edfa420f540a162335eACF3ea05a247',
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 1 other location - About 5 hrs to fix
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 521..539

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

    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 ExecutorSuite.TestExecutor has 156 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (e *ExecutorSuite) TestExecutor() {
        // e.T().Skip()
        testDone := false
        defer func() {
            testDone = true
    Severity: Major
    Found in agents/agents/executor/executor_test.go - About 5 hrs to fix

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

          g.Go(func() error {
              dailyVolMonth, err := client.GetDailyStatisticsByChain(ctx, nil, &volumeType, &monthType, &allPlatformType, &useMv)
              if err != nil {
                  return fmt.Errorf("error rehydrating cache: %w", err)
              }
      Severity: Major
      Found in services/explorer/api/server.go and 8 other locations - About 5 hrs to fix
      services/explorer/api/server.go on lines 518..552
      services/explorer/api/server.go on lines 553..587
      services/explorer/api/server.go on lines 589..623
      services/explorer/api/server.go on lines 624..658
      services/explorer/api/server.go on lines 659..693
      services/explorer/api/server.go on lines 695..730
      services/explorer/api/server.go on lines 731..765
      services/explorer/api/server.go on lines 766..800

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

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

          g.Go(func() error {
              dailyVolAllTimeBridge, err := client.GetDailyStatisticsByChain(ctx, nil, &volumeType, &sixMonthType, &bridgeType, &useMv)
              if err != nil {
                  return fmt.Errorf("error rehydrating cache: %w", err)
              }
      Severity: Major
      Found in services/explorer/api/server.go and 8 other locations - About 5 hrs to fix
      services/explorer/api/server.go on lines 483..517
      services/explorer/api/server.go on lines 518..552
      services/explorer/api/server.go on lines 553..587
      services/explorer/api/server.go on lines 589..623
      services/explorer/api/server.go on lines 624..658
      services/explorer/api/server.go on lines 695..730
      services/explorer/api/server.go on lines 731..765
      services/explorer/api/server.go on lines 766..800

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

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

          g.Go(func() error {
              dailyVolYearSwap, err := client.GetDailyStatisticsByChain(ctx, nil, &volumeType, &threeMonthType, &swapType, &useMv)
              if err != nil {
                  return fmt.Errorf("error rehydrating cache: %w", err)
              }
      Severity: Major
      Found in services/explorer/api/server.go and 8 other locations - About 5 hrs to fix
      services/explorer/api/server.go on lines 483..517
      services/explorer/api/server.go on lines 518..552
      services/explorer/api/server.go on lines 553..587
      services/explorer/api/server.go on lines 589..623
      services/explorer/api/server.go on lines 624..658
      services/explorer/api/server.go on lines 659..693
      services/explorer/api/server.go on lines 695..730
      services/explorer/api/server.go on lines 766..800

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

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

          g.Go(func() error {
              dailyVolMonthBridge, err := client.GetDailyStatisticsByChain(ctx, nil, &volumeType, &monthType, &bridgeType, &useMv)
              if err != nil {
                  return fmt.Errorf("error rehydrating cache: %w", err)
              }
      Severity: Major
      Found in services/explorer/api/server.go and 8 other locations - About 5 hrs to fix
      services/explorer/api/server.go on lines 483..517
      services/explorer/api/server.go on lines 518..552
      services/explorer/api/server.go on lines 553..587
      services/explorer/api/server.go on lines 624..658
      services/explorer/api/server.go on lines 659..693
      services/explorer/api/server.go on lines 695..730
      services/explorer/api/server.go on lines 731..765
      services/explorer/api/server.go on lines 766..800

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

      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