synapsecns/sanguine

View on GitHub
packages/synapse-interface/constants/tokens/auxilliary.ts

Summary

Maintainability
D
1 day
Test Coverage

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

export const FANTOMUSDC = new Token({
  visibilityRank: 101,
  addresses: {
    [CHAINS.FANTOM.id]: '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
  },
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 4 other locations - About 2 hrs to fix
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 443..458
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 946..961
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 1180..1195
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 1197..1212

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

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 FANTOMUSDT = new Token({
  addresses: {
    [CHAINS.FANTOM.id]: '0x049d68029688eabf473097a2fc38ef61633a3c7a',
  },
  decimals: {
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 3 other locations - About 2 hrs to fix
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 893..908
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 963..978
packages/synapse-interface/constants/tokens/deprecated.ts on lines 6..21

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

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

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

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

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

Refactorings

Further Reading

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

export const MIM = new Token({
  addresses: {
    [CHAINS.FANTOM.id]: '0x82f0b8b456c1a451378467398982d4834b6829c1',
    [CHAINS.ARBITRUM.id]: '0xfea7a6a0b346362bf88a9e4a88416b77a57d6c2a',
  },
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 4 other locations - About 2 hrs to fix
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 93..106
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 108..121
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 383..396
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 842..855

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

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 FANTOMETH = new Token({
  addresses: {
    [CHAINS.FANTOM.id]: '0x74b23882a30290451A17c44f4F05243b6b58C76d',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 1 other location - About 2 hrs to fix
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 1050..1064

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

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

export const MULTIAVAX = new Token({
  addresses: {
    [CHAINS.HARMONY.id]: '0xb12c13e66ade1f72f71834f2fc5082db8c091358',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 7 other locations - About 1 hr to fix
packages/synapse-interface/constants/tokens/auxilliary.ts on lines 11..23
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 541..553
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 555..567
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 765..777
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 814..826
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 828..840
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 1112..1124

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

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

export const AVWETH = new Token({
  addresses: {
    [CHAINS.AVALANCHE.id]: '0x53f7c5869a859f0aec3d334ee8b4cf01e3492f21',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/auxilliary.ts and 7 other locations - About 1 hr to fix
packages/synapse-interface/constants/tokens/auxilliary.ts on lines 55..67
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 541..553
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 555..567
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 765..777
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 814..826
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 828..840
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 1112..1124

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

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

There are no issues that match your filters.

Category
Status