synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const GMX: BridgeableToken = {
  addresses: {
    [CHAINS.ARBITRUM.id]: '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a',
    [CHAINS.AVALANCHE.id]: '0x62edc0692bd897d2295872a9ffcac5425011c661',
  },
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 3 other locations - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 251..268
packages/widget/src/constants/bridgeable.ts on lines 186..203
packages/widget/src/constants/bridgeable.ts on lines 251..268

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export interface Chain {
  id: number
  name: string
  rpcUrls: {
    primary: string
Severity: Major
Found in packages/widget/src/types/index.d.ts and 1 other location - About 4 hrs to fix
packages/rest-api/src/types/index.d.ts on lines 17..35

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

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 SPECTRAL: BridgeableToken = {
  priorityRank: 600,
  addresses: {
    [CHAINS.ETHEREUM.id]: '0xAdF7C35560035944e805D98fF17d58CDe2449389',
    [CHAINS.BASE.id]: '0x96419929d7949D6A801A6909c145C8EEf6A40431',
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 1 other location - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 1397..1414

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

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

export const FTM: BridgeableToken = {
  addresses: {
    [CHAINS.FANTOM.id]: ZeroAddress,
    [CHAINS.DFK.id]: '0x2Df041186C844F8a2e2b63F16145Bc6Ff7d23E25',
  },
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 3 other locations - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 1168..1185
packages/rest-api/src/constants/bridgeable.ts on lines 1255..1272
packages/widget/src/constants/bridgeable.ts on lines 1164..1181

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export interface Chain {
  id: number
  name: string
  rpcUrls: {
    primary: string
Severity: Major
Found in packages/rest-api/src/types/index.d.ts and 1 other location - About 4 hrs to fix
packages/widget/src/types/index.d.ts on lines 76..94

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

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

  it('should return 400 for invalid fromToken address', async () => {
    const response = await request(app).get('/bridgeTxInfo').query({
      fromChain: '1',
      toChain: '137',
      fromToken: 'invalid_address',
Severity: Major
Found in packages/rest-api/src/tests/bridgeTxInfoRoute.test.ts and 1 other location - About 4 hrs to fix
packages/rest-api/src/tests/bridgeTxInfoRoute.test.ts on lines 87..101

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

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

  it('should return 400 for unsupported fromChain', async () => {
    const response = await request(app).get('/bridgeTxInfo').query({
      fromChain: '999',
      toChain: '137',
      fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
Severity: Major
Found in packages/rest-api/src/tests/bridgeTxInfoRoute.test.ts and 1 other location - About 4 hrs to fix
packages/rest-api/src/tests/bridgeTxInfoRoute.test.ts on lines 103..117

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

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

export const PEPE: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0x6982508145454ce325ddbe47a25d4ec3d2311933',
    [CHAINS.ARBITRUM.id]: '0xA54B8e178A49F8e5405A4d44Bb31F496e5564A05',
  },
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 3 other locations - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 186..203
packages/widget/src/constants/bridgeable.ts on lines 186..203
packages/widget/src/constants/bridgeable.ts on lines 251..268

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

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

export const KLAY: BridgeableToken = {
  addresses: {
    [CHAINS.KLAYTN.id]: NativeTokenAddress,
    [CHAINS.DFK.id]: '0x97855Ba65aa7ed2F65Ed832a776537268158B78a',
  },
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 3 other locations - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 1255..1272
packages/widget/src/constants/bridgeable.ts on lines 1164..1181
packages/widget/src/constants/bridgeable.ts on lines 1251..1268

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

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 MOVR: BridgeableToken = {
  addresses: {
    [CHAINS.MOONBEAM.id]: '0x1d4C2a246311bB9f827F4C768e277FF5787B7D7E',
    [CHAINS.MOONRIVER.id]: ZeroAddress,
  },
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 1 other location - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 837..854

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

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 SPECTRAL: BridgeableToken = {
  priorityRank: 600,
  addresses: {
    [CHAINS.ETHEREUM.id]: '0xAdF7C35560035944e805D98fF17d58CDe2449389',
    [CHAINS.BASE.id]: '0x96419929d7949D6A801A6909c145C8EEf6A40431',
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 1 other location - About 4 hrs to fix
packages/widget/src/constants/bridgeable.ts on lines 1393..1410

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

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 MOVR: BridgeableToken = {
  addresses: {
    [CHAINS.MOONBEAM.id]: '0x1d4C2a246311bB9f827F4C768e277FF5787B7D7E',
    [CHAINS.MOONRIVER.id]: NativeTokenAddress,
  },
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 1 other location - About 4 hrs to fix
packages/widget/src/constants/bridgeable.ts on lines 835..852

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

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

export const PEPE: BridgeableToken = {
  addresses: {
    [CHAINS.ETHEREUM.id]: '0x6982508145454ce325ddbe47a25d4ec3d2311933',
    [CHAINS.ARBITRUM.id]: '0xA54B8e178A49F8e5405A4d44Bb31F496e5564A05',
  },
Severity: Major
Found in packages/widget/src/constants/bridgeable.ts and 3 other locations - About 4 hrs to fix
packages/rest-api/src/constants/bridgeable.ts on lines 186..203
packages/rest-api/src/constants/bridgeable.ts on lines 251..268
packages/widget/src/constants/bridgeable.ts on lines 186..203

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

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

export const useGasEstimator = () => {
  const dispatch = useAppDispatch()
  const { address } = useAccount()
  const { synapseSDK } = useSynapseContext()
  const { balances } = usePortfolioState()
Severity: Major
Found in packages/synapse-interface/utils/hooks/useGasEstimator.ts - About 4 hrs to fix

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

    func (ec *executionContext) _BridgeWatcherTx_type(ctx context.Context, field graphql.CollectedField, obj *model.BridgeWatcherTx) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_BridgeWatcherTx_type(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3255..3281
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3408..3434
    services/explorer/graphql/server/graph/resolver/server.go on lines 3643..3669
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5489..5515
    services/explorer/graphql/server/graph/resolver/server.go on lines 5556..5582

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

    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

    func (ec *executionContext) _MessageBusTransaction_fromInfo(ctx context.Context, field graphql.CollectedField, obj *model.MessageBusTransaction) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_MessageBusTransaction_fromInfo(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3255..3281
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3408..3434
    services/explorer/graphql/server/graph/resolver/server.go on lines 3643..3669
    services/explorer/graphql/server/graph/resolver/server.go on lines 3755..3781
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5556..5582

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

    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

    func (ec *executionContext) _BridgeTransaction_toInfo(ctx context.Context, field graphql.CollectedField, obj *model.BridgeTransaction) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_BridgeTransaction_toInfo(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3255..3281
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3643..3669
    services/explorer/graphql/server/graph/resolver/server.go on lines 3755..3781
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5489..5515
    services/explorer/graphql/server/graph/resolver/server.go on lines 5556..5582

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

    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

    func (ec *executionContext) _BlockHeight_type(ctx context.Context, field graphql.CollectedField, obj *model.BlockHeight) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_BlockHeight_type(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3408..3434
    services/explorer/graphql/server/graph/resolver/server.go on lines 3643..3669
    services/explorer/graphql/server/graph/resolver/server.go on lines 3755..3781
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5489..5515
    services/explorer/graphql/server/graph/resolver/server.go on lines 5556..5582

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

    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

    func (ec *executionContext) _BridgeWatcherTx_bridgeTx(ctx context.Context, field graphql.CollectedField, obj *model.BridgeWatcherTx) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_BridgeWatcherTx_bridgeTx(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3255..3281
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3408..3434
    services/explorer/graphql/server/graph/resolver/server.go on lines 3755..3781
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5489..5515
    services/explorer/graphql/server/graph/resolver/server.go on lines 5556..5582

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

    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

    func (ec *executionContext) _MessageBusTransaction_toInfo(ctx context.Context, field graphql.CollectedField, obj *model.MessageBusTransaction) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext_MessageBusTransaction_toInfo(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 8 other locations - About 4 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 3255..3281
    services/explorer/graphql/server/graph/resolver/server.go on lines 3337..3363
    services/explorer/graphql/server/graph/resolver/server.go on lines 3408..3434
    services/explorer/graphql/server/graph/resolver/server.go on lines 3643..3669
    services/explorer/graphql/server/graph/resolver/server.go on lines 3755..3781
    services/explorer/graphql/server/graph/resolver/server.go on lines 3837..3863
    services/explorer/graphql/server/graph/resolver/server.go on lines 5202..5228
    services/explorer/graphql/server/graph/resolver/server.go on lines 5489..5515

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

    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