polkadot-js/api

View on GitHub
packages/types/src/interfaces/metadata/types.ts

Summary

Maintainability
F
1 wk
Test Coverage

File types.ts has 471 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

import type { PortableRegistry } from '@polkadot/types';
import type { BTreeMap, Bytes, Enum, Option, Struct, Text, Type, Vec, WrapperOpaque, bool, u8 } from '@polkadot/types-codec';
Severity: Minor
Found in packages/types/src/interfaces/metadata/types.ts - About 7 hrs to fix

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

    export interface StorageEntryTypeV11 extends Enum {
      readonly isPlain: boolean;
      readonly asPlain: Type;
      readonly isMap: boolean;
      readonly asMap: {
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 6 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 516..535
    packages/types/src/interfaces/metadata/types.ts on lines 604..623

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

    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 interface StorageEntryTypeV10 extends Enum {
      readonly isPlain: boolean;
      readonly asPlain: Type;
      readonly isMap: boolean;
      readonly asMap: {
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 6 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 538..557
    packages/types/src/interfaces/metadata/types.ts on lines 604..623

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

    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 interface StorageEntryTypeV9 extends Enum {
      readonly isPlain: boolean;
      readonly asPlain: Type;
      readonly isMap: boolean;
      readonly asMap: {
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 6 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 516..535
    packages/types/src/interfaces/metadata/types.ts on lines 538..557

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

    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 interface ModuleMetadataV13 extends Struct {
      readonly name: Text;
      readonly storage: Option<StorageMetadataV13>;
      readonly calls: Option<Vec<FunctionMetadataV13>>;
      readonly events: Option<Vec<EventMetadataV13>>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 1 other location - About 4 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 281..289

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

    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 interface ModuleMetadataV12 extends Struct {
      readonly name: Text;
      readonly storage: Option<StorageMetadataV12>;
      readonly calls: Option<Vec<FunctionMetadataV12>>;
      readonly events: Option<Vec<EventMetadataV12>>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 1 other location - About 4 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 292..300

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

    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 interface ModuleMetadataV10 extends Struct {
      readonly name: Text;
      readonly storage: Option<StorageMetadataV10>;
      readonly calls: Option<Vec<FunctionMetadataV10>>;
      readonly events: Option<Vec<EventMetadataV10>>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 271..278
    packages/types/src/interfaces/metadata/types.ts on lines 303..310

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

    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 interface ModuleMetadataV11 extends Struct {
      readonly name: Text;
      readonly storage: Option<StorageMetadataV11>;
      readonly calls: Option<Vec<FunctionMetadataV11>>;
      readonly events: Option<Vec<EventMetadataV11>>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 261..268
    packages/types/src/interfaces/metadata/types.ts on lines 303..310

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

    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 interface ModuleMetadataV9 extends Struct {
      readonly name: Text;
      readonly storage: Option<StorageMetadataV9>;
      readonly calls: Option<Vec<FunctionMetadataV9>>;
      readonly events: Option<Vec<EventMetadataV9>>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 261..268
    packages/types/src/interfaces/metadata/types.ts on lines 271..278

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

    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 interface StorageHasherV11 extends Enum {
      readonly isBlake2128: boolean;
      readonly isBlake2256: boolean;
      readonly isBlake2128Concat: boolean;
      readonly isTwox128: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/democracy/types.ts on lines 31..40
    packages/types/src/interfaces/parachains/types.ts on lines 623..632

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

    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 interface EventMetadataV14 extends Struct {
      readonly name: Text;
      readonly fields: Vec<Si1Field>;
      readonly index: u8;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 35..41
    packages/types/src/interfaces/metadata/types.ts on lines 156..162

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

    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 interface ErrorMetadataV14 extends Struct {
      readonly name: Text;
      readonly fields: Vec<Si1Field>;
      readonly index: u8;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 65..71
    packages/types/src/interfaces/metadata/types.ts on lines 156..162

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

    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 interface FunctionMetadataV14 extends Struct {
      readonly name: Text;
      readonly fields: Vec<Si1Field>;
      readonly index: u8;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 35..41
    packages/types/src/interfaces/metadata/types.ts on lines 65..71

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

    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 interface StorageHasherV10 extends Enum {
      readonly isBlake2128: boolean;
      readonly isBlake2256: boolean;
      readonly isBlake2128Concat: boolean;
      readonly isTwox128: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/purchase/types.ts on lines 17..25

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

    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 interface ExtrinsicMetadataV15 extends Struct {
      readonly version: u8;
      readonly addressType: SiLookupTypeId;
      readonly callType: SiLookupTypeId;
      readonly signatureType: SiLookupTypeId;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/parachains/types.ts on lines 36..43
    packages/types/src/interfaces/state/types.ts on lines 81..88

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

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

    export interface StorageEntryMetadataV10 extends Struct {
      readonly name: Text;
      readonly modifier: StorageEntryModifierV10;
      readonly type: StorageEntryTypeV10;
      readonly fallback: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/democracy/types.ts on lines 58..64
    packages/types/src/interfaces/metadata/types.ts on lines 448..454
    packages/types/src/interfaces/metadata/types.ts on lines 460..466
    packages/types/src/interfaces/metadata/types.ts on lines 469..475
    packages/types/src/interfaces/metadata/types.ts on lines 478..484

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

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

    export interface StorageEntryMetadataV9 extends Struct {
      readonly name: Text;
      readonly modifier: StorageEntryModifierV9;
      readonly type: StorageEntryTypeV9;
      readonly fallback: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/democracy/types.ts on lines 58..64
    packages/types/src/interfaces/metadata/types.ts on lines 439..445
    packages/types/src/interfaces/metadata/types.ts on lines 448..454
    packages/types/src/interfaces/metadata/types.ts on lines 460..466
    packages/types/src/interfaces/metadata/types.ts on lines 469..475

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

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

    export interface StorageEntryMetadataV11 extends Struct {
      readonly name: Text;
      readonly modifier: StorageEntryModifierV11;
      readonly type: StorageEntryTypeV11;
      readonly fallback: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/democracy/types.ts on lines 58..64
    packages/types/src/interfaces/metadata/types.ts on lines 439..445
    packages/types/src/interfaces/metadata/types.ts on lines 460..466
    packages/types/src/interfaces/metadata/types.ts on lines 469..475
    packages/types/src/interfaces/metadata/types.ts on lines 478..484

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

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

    export interface StorageEntryMetadataV13 extends Struct {
      readonly name: Text;
      readonly modifier: StorageEntryModifierV13;
      readonly type: StorageEntryTypeV13;
      readonly fallback: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/democracy/types.ts on lines 58..64
    packages/types/src/interfaces/metadata/types.ts on lines 439..445
    packages/types/src/interfaces/metadata/types.ts on lines 448..454
    packages/types/src/interfaces/metadata/types.ts on lines 469..475
    packages/types/src/interfaces/metadata/types.ts on lines 478..484

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

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

    export interface StorageEntryMetadataV14 extends Struct {
      readonly name: Text;
      readonly modifier: StorageEntryModifierV14;
      readonly type: StorageEntryTypeV14;
      readonly fallback: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/democracy/types.ts on lines 58..64
    packages/types/src/interfaces/metadata/types.ts on lines 439..445
    packages/types/src/interfaces/metadata/types.ts on lines 448..454
    packages/types/src/interfaces/metadata/types.ts on lines 460..466
    packages/types/src/interfaces/metadata/types.ts on lines 478..484

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

    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 interface RuntimeApiMethodMetadataV15 extends Struct {
      readonly name: Text;
      readonly inputs: Vec<RuntimeApiMethodParamMetadataV15>;
      readonly output: SiLookupTypeId;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/scaleInfo/types.ts on lines 138..143
    packages/types/src/interfaces/scaleInfo/types.ts on lines 213..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 65.

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

    export interface PalletConstantMetadataV14 extends Struct {
      readonly name: Text;
      readonly type: SiLookupTypeId;
      readonly value: Bytes;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 12 other locations - About 1 hr to fix
    packages/types/src/interfaces/beefy/types.ts on lines 25..30
    packages/types/src/interfaces/benchmark/types.ts on lines 8..13
    packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
    packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
    packages/types/src/interfaces/eth/types.ts on lines 405..410
    packages/types/src/interfaces/evm/types.ts on lines 14..19
    packages/types/src/interfaces/evm/types.ts on lines 31..36
    packages/types/src/interfaces/grandpa/types.ts on lines 59..64
    packages/types/src/interfaces/metadata/types.ts on lines 253..258
    packages/types/src/interfaces/parachains/types.ts on lines 262..267
    packages/types/src/interfaces/staking/types.ts on lines 287..292
    packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

    export interface ModuleConstantMetadataV9 extends Struct {
      readonly name: Text;
      readonly type: Type;
      readonly value: Bytes;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 12 other locations - About 1 hr to fix
    packages/types/src/interfaces/beefy/types.ts on lines 25..30
    packages/types/src/interfaces/benchmark/types.ts on lines 8..13
    packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
    packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
    packages/types/src/interfaces/eth/types.ts on lines 405..410
    packages/types/src/interfaces/evm/types.ts on lines 14..19
    packages/types/src/interfaces/evm/types.ts on lines 31..36
    packages/types/src/interfaces/grandpa/types.ts on lines 59..64
    packages/types/src/interfaces/metadata/types.ts on lines 334..339
    packages/types/src/interfaces/parachains/types.ts on lines 262..267
    packages/types/src/interfaces/staking/types.ts on lines 287..292
    packages/types/src/interfaces/utility/types.ts on lines 8..13

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

    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 interface MetadataV14 extends Struct {
      readonly lookup: PortableRegistry;
      readonly pallets: Vec<PalletMetadataV14>;
      readonly extrinsic: ExtrinsicMetadataV14;
      readonly type: SiLookupTypeId;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/parachains/types.ts on lines 598..603
    packages/types/src/interfaces/uniques/types.ts on lines 45..50

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

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

    export interface RuntimeApiMetadataV15 extends Struct {
      readonly name: Text;
      readonly methods: Vec<RuntimeApiMethodMetadataV15>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 165..169

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

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

    export interface FunctionMetadataV9 extends Struct {
      readonly name: Text;
      readonly args: Vec<FunctionArgumentMetadataV9>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

    export interface EventMetadataV9 extends Struct {
      readonly name: Text;
      readonly args: Vec<Type>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

    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

      readonly type: 'V0' | 'V1' | 'V2' | 'V3' | 'V4' | 'V5' | 'V6' | 'V7' | 'V8' | 'V9' | 'V10' | 'V11' | 'V12' | 'V13' | 'V14' | 'V15';
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 1 hr to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 2423..2423
    packages/types-augment/src/lookup/types-substrate.ts on lines 7754..7754

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

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

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

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

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

    Refactorings

    Further Reading

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

    export interface StorageEntryModifierV9 extends Enum {
      readonly isOptional: boolean;
      readonly isDefault: boolean;
      readonly isRequired: boolean;
      readonly type: 'Optional' | 'Default' | 'Required';
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 15 other locations - About 1 hr to fix
    packages/types/src/interfaces/babe/types.ts on lines 10..15
    packages/types/src/interfaces/balances/types.ts on lines 38..43
    packages/types/src/interfaces/bridges/types.ts on lines 102..107
    packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
    packages/types/src/interfaces/parachains/types.ts on lines 539..544
    packages/types/src/interfaces/parachains/types.ts on lines 573..578
    packages/types/src/interfaces/society/types.ts on lines 25..30
    packages/types/src/interfaces/society/types.ts on lines 33..38
    packages/types/src/interfaces/staking/types.ts on lines 95..100
    packages/types/src/interfaces/statement/types.ts on lines 7..12
    packages/types/src/interfaces/statement/types.ts on lines 15..20
    packages/types/src/interfaces/system/types.ts on lines 64..69
    packages/types/src/interfaces/system/types.ts on lines 103..108
    packages/types/src/interfaces/txqueue/types.ts on lines 9..14
    packages/types/src/interfaces/xcm/types.ts on lines 910..915

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

    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

      readonly asNMap: {
        readonly keyVec: Vec<Type>;
        readonly hashers: Vec<StorageHasherV13>;
        readonly value: Type;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 3 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 3076..3080
    packages/types-augment/src/lookup/types-substrate.ts on lines 4965..4969
    packages/types-augment/src/lookup/types-substrate.ts on lines 4988..4992

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

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

    export interface FunctionArgumentMetadataV14 extends Struct {
      readonly name: Text;
      readonly type: Type;
      readonly typeName: Option<Type>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 16 other locations - About 45 mins to fix
    packages/types/src/interfaces/benchmark/types.ts on lines 25..29
    packages/types/src/interfaces/contracts/types.ts on lines 34..38
    packages/types/src/interfaces/contracts/types.ts on lines 356..360
    packages/types/src/interfaces/eth/types.ts on lines 278..282
    packages/types/src/interfaces/grandpa/types.ts on lines 67..71
    packages/types/src/interfaces/grandpa/types.ts on lines 97..101
    packages/types/src/interfaces/grandpa/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 96..100
    packages/types/src/interfaces/parachains/types.ts on lines 490..494
    packages/types/src/interfaces/parachains/types.ts on lines 930..934
    packages/types/src/interfaces/recovery/types.ts on lines 8..12
    packages/types/src/interfaces/staking/types.ts on lines 295..299
    packages/types/src/interfaces/state/types.ts on lines 23..27
    packages/types/src/interfaces/state/types.ts on lines 74..78
    packages/types/src/interfaces/system/types.ts on lines 258..262
    packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

    export interface ExtrinsicMetadataV14 extends Struct {
      readonly type: SiLookupTypeId;
      readonly version: u8;
      readonly signedExtensions: Vec<SignedExtensionMetadataV14>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 16 other locations - About 45 mins to fix
    packages/types/src/interfaces/benchmark/types.ts on lines 25..29
    packages/types/src/interfaces/contracts/types.ts on lines 34..38
    packages/types/src/interfaces/contracts/types.ts on lines 356..360
    packages/types/src/interfaces/eth/types.ts on lines 278..282
    packages/types/src/interfaces/grandpa/types.ts on lines 67..71
    packages/types/src/interfaces/grandpa/types.ts on lines 97..101
    packages/types/src/interfaces/grandpa/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 128..132
    packages/types/src/interfaces/parachains/types.ts on lines 490..494
    packages/types/src/interfaces/parachains/types.ts on lines 930..934
    packages/types/src/interfaces/recovery/types.ts on lines 8..12
    packages/types/src/interfaces/staking/types.ts on lines 295..299
    packages/types/src/interfaces/state/types.ts on lines 23..27
    packages/types/src/interfaces/state/types.ts on lines 74..78
    packages/types/src/interfaces/system/types.ts on lines 258..262
    packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

      readonly asMap: {
        readonly hashers: Vec<StorageHasherV14>;
        readonly key: SiLookupTypeId;
        readonly value: SiLookupTypeId;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/metadata/types.ts and 5 other locations - About 35 mins to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 3669..3673
    packages/types-augment/src/lookup/types-substrate.ts on lines 4019..4023
    packages/types-augment/src/lookup/types-substrate.ts on lines 4154..4158
    packages/types-augment/src/lookup/types-substrate.ts on lines 8368..8372
    packages/types/src/interfaces/xcm/types.ts on lines 874..878

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

    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