synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

const generateDestinationRemainingTokens = (
  originChainId,
  destinationChainId,
  targetTokens
) => {
Severity: Major
Found in packages/widget/src/components/ui/TokenSelect.tsx and 1 other location - About 6 hrs to fix
packages/widget/src/components/ui/TokenSelect.tsx on lines 119..148

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

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

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

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

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

Refactorings

Further Reading

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

func (ec *executionContext) _BridgeTransaction(ctx context.Context, sel ast.SelectionSet, obj *model.BridgeTransaction) graphql.Marshaler {
    fields := graphql.CollectFields(ec.OperationContext, sel, bridgeTransactionImplementors)

    out := graphql.NewFieldSet(fields)
    deferred := make(map[string]*graphql.FieldSet)
Severity: Major
Found in services/explorer/graphql/server/graph/resolver/server.go and 2 other locations - About 6 hrs to fix
services/explorer/graphql/server/graph/resolver/server.go on lines 10460..10502
services/explorer/graphql/server/graph/resolver/server.go on lines 10712..10754

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

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

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

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

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

Refactorings

Further Reading

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

func (ec *executionContext) _Leaderboard(ctx context.Context, sel ast.SelectionSet, obj *model.Leaderboard) graphql.Marshaler {
    fields := graphql.CollectFields(ec.OperationContext, sel, leaderboardImplementors)

    out := graphql.NewFieldSet(fields)
    deferred := make(map[string]*graphql.FieldSet)
Severity: Major
Found in services/explorer/graphql/server/graph/resolver/server.go and 2 other locations - About 6 hrs to fix
services/explorer/graphql/server/graph/resolver/server.go on lines 10414..10456
services/explorer/graphql/server/graph/resolver/server.go on lines 10460..10502

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

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

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

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

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

Refactorings

Further Reading

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

func (ec *executionContext) _BridgeWatcherTx(ctx context.Context, sel ast.SelectionSet, obj *model.BridgeWatcherTx) graphql.Marshaler {
    fields := graphql.CollectFields(ec.OperationContext, sel, bridgeWatcherTxImplementors)

    out := graphql.NewFieldSet(fields)
    deferred := make(map[string]*graphql.FieldSet)
Severity: Major
Found in services/explorer/graphql/server/graph/resolver/server.go and 2 other locations - About 6 hrs to fix
services/explorer/graphql/server/graph/resolver/server.go on lines 10414..10456
services/explorer/graphql/server/graph/resolver/server.go on lines 10712..10754

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

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

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

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

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

Refactorings

Further Reading

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

export function WideSupportIcon() {
  return (
    <svg
      width="34"
      height="34"
packages/synapse-interface/components/icons/LandingIcons/DeveloperIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/ExtensibleIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/GeneralizedIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/SecureIcon.tsx on lines 1..31

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

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

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

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

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

Refactorings

Further Reading

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

export function DeveloperIcon() {
  return (
    <svg
      width="38"
      height="38"
packages/synapse-interface/components/icons/LandingIcons/ExtensibleIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/GeneralizedIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/SecureIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/WideSupportIcon.tsx on lines 1..31

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

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

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

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

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

Refactorings

Further Reading

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

export function SecureIcon() {
  return (
    <svg
      width="28"
      height="32"
packages/synapse-interface/components/icons/LandingIcons/DeveloperIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/ExtensibleIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/GeneralizedIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/WideSupportIcon.tsx on lines 1..31

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

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

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

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

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

Refactorings

Further Reading

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

export function GeneralizedIcon() {
  return (
    <svg
      width="32"
      height="37"
packages/synapse-interface/components/icons/LandingIcons/DeveloperIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/ExtensibleIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/SecureIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/WideSupportIcon.tsx on lines 1..31

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

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

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

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

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

Refactorings

Further Reading

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

export function ExtensibleIcon() {
  return (
    <svg
      width="36"
      height="36"
packages/synapse-interface/components/icons/LandingIcons/DeveloperIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/GeneralizedIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/SecureIcon.tsx on lines 1..31
packages/synapse-interface/components/icons/LandingIcons/WideSupportIcon.tsx on lines 1..31

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

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

  {
    inputs: [
      {
        internalType: 'contract IERC20[]',
        name: '_pooledTokens',
Severity: Major
Found in packages/synapse-interface/constants/abis/swap.ts and 1 other location - About 6 hrs to fix
packages/synapse-interface/constants/abis/miniChef.ts on lines 469..516

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

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

  {
    inputs: [
      {
        internalType: 'contract IERC20',
        name: 'token',
Severity: Major
Found in packages/synapse-interface/constants/abis/miniChef.ts and 1 other location - About 6 hrs to fix
packages/synapse-interface/constants/abis/swap.ts on lines 627..674

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

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 InitNotaryDB(parentCtx context.Context, database string, path string, tablePrefix string, handler metrics.Handler) (_ db.NotaryDB, err error) {
    ctx, span := handler.Tracer().Start(parentCtx, "InitNotaryDB", trace.WithAttributes(
        attribute.String("database", database),
        attribute.String("path", path),
        attribute.String("tablePrefix", tablePrefix),
Severity: Major
Found in agents/agents/notary/cmd/commands.go and 1 other location - About 6 hrs to fix
agents/agents/guard/cmd/commands.go on lines 239..288

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

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 InitGuardDB(parentCtx context.Context, database string, path string, tablePrefix string, handler metrics.Handler) (_ db.GuardDB, err error) {
    ctx, span := handler.Tracer().Start(parentCtx, "InitGuardDB", trace.WithAttributes(
        attribute.String("database", database),
        attribute.String("path", path),
        attribute.String("tablePrefix", tablePrefix),
Severity: Major
Found in agents/agents/guard/cmd/commands.go and 1 other location - About 6 hrs to fix
agents/agents/notary/cmd/commands.go on lines 169..218

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

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

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

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

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

Refactorings

Further Reading

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

export const ARBITRUM_3POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.ARBITRUM.id]: '0xcFd72be67Ee69A0dd7cF0f846Fc0D98C33d60F16',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 352..376
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 404..428

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

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

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

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

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

Refactorings

Further Reading

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

export const ARBITRUM_3POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.ARBITRUM.id]: '0xcFd72be67Ee69A0dd7cF0f846Fc0D98C33d60F16',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 2 other locations - About 6 hrs to fix
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 354..378
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 406..430

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

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

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

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

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

Refactorings

Further Reading

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

export const AURORA_TS_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.AURORA.id]: '0xffb69779f14E851A8c550Bf5bB1933c44BBDE129',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 2 other locations - About 6 hrs to fix
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 380..404
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 406..430

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

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

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

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

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

Refactorings

Further Reading

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

export const FANTOM_3POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.FANTOM.id]: '0x2DC777ff99058a12844A33D9B1AE6c8AB4701F66',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 352..376
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 378..402

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 164.

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

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

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

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

Refactorings

Further Reading

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

export const FANTOM_3POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.FANTOM.id]: '0x2DC777ff99058a12844A33D9B1AE6c8AB4701F66',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 2 other locations - About 6 hrs to fix
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 354..378
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 380..404

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

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

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

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

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

Refactorings

Further Reading

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

export const AURORA_TS_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.AURORA.id]: '0xffb69779f14E851A8c550Bf5bB1933c44BBDE129',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 378..402
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 404..428

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

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 AllTimeStatCard = ({
  onClick,
  title,
  children,
  active = false,
Severity: Major
Found in packages/explorer-ui/components/pages/Home/Stats.tsx and 1 other location - About 6 hrs to fix
packages/explorer-ui/components/pages/Home/Stats.tsx on lines 87..109

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

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