synapsecns/sanguine

View on GitHub
packages/rest-api/src/constants/chains.ts

Summary

Maintainability
F
1 wk
Test Coverage

File chains.ts has 491 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import _ from 'lodash'

import { Chain } from '../types'
import { getOmniRpcUrl } from '../utils/getOmniRpcUrl'

Severity: Minor
Found in packages/rest-api/src/constants/chains.ts - About 7 hrs to fix

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

    export const CHAINS = {
      ETHEREUM,
      ARBITRUM,
      BNBCHAIN,
      AVALANCHE,
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 1 other location - About 4 hrs to fix
    packages/widget/src/constants/chains.ts on lines 488..512

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

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

    export const POLYGON: Chain = {
      id: 137,
      name: 'Polygon',
      rpcUrls: {
        primary: getOmniRpcUrl(137),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const MOONRIVER: Chain = {
      id: 1285,
      name: 'Moonriver',
      rpcUrls: {
        primary: getOmniRpcUrl(1285),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const LINEA: Chain = {
      id: 59144,
      name: 'Linea',
      rpcUrls: {
        primary: getOmniRpcUrl(59144),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446

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

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

    export const OPTIMISM: Chain = {
      id: 10,
      name: 'Optimism',
      rpcUrls: {
        primary: getOmniRpcUrl(10),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const AURORA: Chain = {
      id: 1313161554,
      name: 'Aurora',
      rpcUrls: {
        primary: getOmniRpcUrl(1313161554),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const CANTO: Chain = {
      id: 7700,
      name: 'Canto',
      rpcUrls: {
        primary: getOmniRpcUrl(7700),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const DFK: Chain = {
      id: 53935,
      name: 'DFK Chain',
      rpcUrls: {
        primary: getOmniRpcUrl(53935),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const SCROLL: Chain = {
      id: 534352,
      name: 'Scroll',
      rpcUrls: {
        primary: getOmniRpcUrl(534352),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const ETHEREUM: Chain = {
      id: 1,
      name: 'Ethereum',
      rpcUrls: {
        primary: getOmniRpcUrl(1),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const CRONOS: Chain = {
      id: 25,
      name: 'Cronos',
      rpcUrls: {
        primary: getOmniRpcUrl(25),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const BOBA: Chain = {
      id: 288,
      name: 'Boba Chain',
      rpcUrls: {
        primary: getOmniRpcUrl(288),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const ARBITRUM: Chain = {
      id: 42161,
      name: 'Arbitrum',
      rpcUrls: {
        primary: getOmniRpcUrl(42161),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const METIS: Chain = {
      id: 1088,
      name: 'Metis',
      rpcUrls: {
        primary: getOmniRpcUrl(1088),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const AVALANCHE: Chain = {
      id: 43114,
      name: 'Avalanche',
      rpcUrls: {
        primary: getOmniRpcUrl(43114),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const FANTOM: Chain = {
      id: 250,
      name: 'Fantom',
      rpcUrls: {
        primary: getOmniRpcUrl(250),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const BLAST: Chain = {
      id: 81457,
      name: 'Blast',
      rpcUrls: {
        primary: getOmniRpcUrl(81457),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const DOGE: Chain = {
      id: 2000,
      name: 'Dogechain',
      rpcUrls: {
        primary: getOmniRpcUrl(2000),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const HARMONY: Chain = {
      id: 1666600000,
      name: 'Harmony',
      rpcUrls: {
        primary: getOmniRpcUrl(1666600000),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const BASE: Chain = {
      id: 8453,
      name: 'Base',
      rpcUrls: {
        primary: getOmniRpcUrl(8453),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const BNBCHAIN: Chain = {
      id: 56,
      name: 'BNB Chain',
      rpcUrls: {
        primary: getOmniRpcUrl(56),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const KLAYTN: Chain = {
      id: 8217,
      name: 'Klaytn',
      rpcUrls: {
        primary: getOmniRpcUrl(8217),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 321..340
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

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

    export const MOONBEAM: Chain = {
      id: 1284,
      name: 'Moonbeam',
      rpcUrls: {
        primary: getOmniRpcUrl(1284),
    Severity: Major
    Found in packages/rest-api/src/constants/chains.ts and 21 other locations - About 3 hrs to fix
    packages/rest-api/src/constants/chains.ts on lines 6..25
    packages/rest-api/src/constants/chains.ts on lines 27..46
    packages/rest-api/src/constants/chains.ts on lines 48..67
    packages/rest-api/src/constants/chains.ts on lines 69..88
    packages/rest-api/src/constants/chains.ts on lines 90..109
    packages/rest-api/src/constants/chains.ts on lines 111..130
    packages/rest-api/src/constants/chains.ts on lines 132..151
    packages/rest-api/src/constants/chains.ts on lines 153..172
    packages/rest-api/src/constants/chains.ts on lines 174..193
    packages/rest-api/src/constants/chains.ts on lines 195..214
    packages/rest-api/src/constants/chains.ts on lines 216..235
    packages/rest-api/src/constants/chains.ts on lines 237..256
    packages/rest-api/src/constants/chains.ts on lines 258..277
    packages/rest-api/src/constants/chains.ts on lines 279..298
    packages/rest-api/src/constants/chains.ts on lines 300..319
    packages/rest-api/src/constants/chains.ts on lines 342..361
    packages/rest-api/src/constants/chains.ts on lines 363..382
    packages/rest-api/src/constants/chains.ts on lines 384..403
    packages/rest-api/src/constants/chains.ts on lines 405..425
    packages/rest-api/src/constants/chains.ts on lines 427..446
    packages/rest-api/src/constants/chains.ts on lines 448..467

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

    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