polkadot-js/api

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

Summary

Maintainability
F
1 wk
Test Coverage

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

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

import type { BTreeMap, BitVec, Bytes, Enum, HashMap, Option, Struct, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts - About 1 day to fix

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

    export interface SlotRange10 extends Enum {
      readonly isZeroZero: boolean;
      readonly isZeroOne: boolean;
      readonly isZeroTwo: boolean;
      readonly isZeroThree: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 4 hrs to fix
    packages/types/src/interfaces/mmr/types.ts on lines 19..31
    packages/types/src/interfaces/runtime/types.ts on lines 302..314

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

    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 CandidateDescriptor extends Struct {
      readonly paraId: ParaId;
      readonly relayParent: RelayChainHash;
      readonly collatorId: CollatorId;
      readonly persistedValidationDataHash: Hash;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/contracts/types.ts on lines 430..440
    packages/types/src/interfaces/parachains/types.ts on lines 23..33

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

    export interface AbridgedHostConfiguration extends Struct {
      readonly maxCodeSize: u32;
      readonly maxHeadDataSize: u32;
      readonly maxUpwardQueueCount: u32;
      readonly maxUpwardQueueSize: u32;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/contracts/types.ts on lines 430..440
    packages/types/src/interfaces/parachains/types.ts on lines 130..140

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

    export interface ParaLifecycle extends Enum {
      readonly isOnboarding: boolean;
      readonly isParathread: boolean;
      readonly isParachain: boolean;
      readonly isUpgradingToParachain: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 640..649

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

    export interface HrmpChannel extends Struct {
      readonly maxCapacity: u32;
      readonly maxTotalSize: u32;
      readonly maxMessageSize: u32;
      readonly msgCount: u32;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 3 hrs to fix
    packages/types/src/interfaces/state/types.ts on lines 59..68

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

    export interface Statement extends Enum {
      readonly isNever: boolean;
      readonly isCandidate: boolean;
      readonly asCandidate: Hash;
      readonly isValid: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/babe/types.ts on lines 104..113

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

    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 CandidateCommitments extends Struct {
      readonly upwardMessages: Vec<UpwardMessage>;
      readonly horizontalMessages: Vec<OutboundHrmpMessage>;
      readonly newValidationCode: Option<ValidationCode>;
      readonly headData: HeadData;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/cumulus/types.ts on lines 9..16

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

    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 CandidatePendingAvailability extends Struct {
      readonly core: CoreIndex;
      readonly hash: CandidateHash;
      readonly descriptor: CandidateDescriptor;
      readonly availabilityVotes: BitVec;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/contracts/types.ts on lines 418..427

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

    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 IncomingParachain extends Enum {
      readonly isUnset: boolean;
      readonly asUnset: NewBidder;
      readonly isFixed: boolean;
      readonly asFixed: IncomingParachainFixed;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 5 other locations - About 2 hrs to fix
    packages/types/src/interfaces/extrinsics/types.ts on lines 54..62
    packages/types/src/interfaces/runtime/types.ts on lines 234..242
    packages/types/src/interfaces/xcm/types.ts on lines 561..569
    packages/types/src/interfaces/xcm/types.ts on lines 583..591
    packages/types/src/interfaces/xcm/types.ts on lines 601..609

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

    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 AbridgedCandidateReceipt extends Struct {
      readonly parachainIndex: ParaId;
      readonly relayParent: Hash;
      readonly headData: HeadData;
      readonly collator: CollatorId;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 413..421

    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 AbridgedHrmpChannel extends Struct {
      readonly maxCapacity: u32;
      readonly maxTotalSize: u32;
      readonly maxMessageSize: u32;
      readonly msgCount: u32;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/metadata/types.ts on lines 103..110
    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 3 locations. Consider refactoring.
    Open

    export interface ValidityAttestation extends Enum {
      readonly isNever: boolean;
      readonly isImplicit: boolean;
      readonly asImplicit: ValidatorSignature;
      readonly isExplicit: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/crowdloan/types.ts on lines 26..33
    packages/types/src/interfaces/xcm/types.ts on lines 541..548

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

    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 HrmpOpenChannelRequest extends Struct {
      readonly confirmed: bool;
      readonly age: SessionIndex;
      readonly senderDeposit: Balance;
      readonly maxMessageSize: u32;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/contracts/types.ts on lines 321..328
    packages/types/src/interfaces/treasury/types.ts on lines 9..16

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

    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 TransientValidationData extends Struct {
      readonly maxCodeSize: u32;
      readonly maxHeadDataSize: u32;
      readonly balance: Balance;
      readonly codeUpgradeAllowed: Option<BlockNumber>;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 382..388
    packages/types/src/interfaces/grandpa/types.ts on lines 19..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 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 19 locations. Consider refactoring.
    Open

    export interface DisputeStatement extends Enum {
      readonly isValid: boolean;
      readonly asValid: ValidDisputeStatementKind;
      readonly isInvalid: boolean;
      readonly asInvalid: InvalidDisputeStatementKind;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 18 other locations - About 1 hr to fix
    packages/types/src/interfaces/author/types.ts on lines 8..14
    packages/types/src/interfaces/babe/types.ts on lines 167..173
    packages/types/src/interfaces/contracts/types.ts on lines 25..31
    packages/types/src/interfaces/contracts/types.ts on lines 141..147
    packages/types/src/interfaces/contracts/types.ts on lines 522..528
    packages/types/src/interfaces/democracy/types.ts on lines 10..16
    packages/types/src/interfaces/democracy/types.ts on lines 49..55
    packages/types/src/interfaces/democracy/types.ts on lines 76..82
    packages/types/src/interfaces/democracy/types.ts on lines 88..94
    packages/types/src/interfaces/democracy/types.ts on lines 127..133
    packages/types/src/interfaces/eth/types.ts on lines 367..373
    packages/types/src/interfaces/eth/types.ts on lines 427..433
    packages/types/src/interfaces/grandpa/types.ts on lines 74..80
    packages/types/src/interfaces/parachains/types.ts on lines 103..109
    packages/types/src/interfaces/state/types.ts on lines 111..117
    packages/types/src/interfaces/system/types.ts on lines 451..457
    packages/types/src/interfaces/xcm/types.ts on lines 352..358
    packages/types/src/interfaces/xcm/types.ts on lines 666..672

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

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

    export interface Bidder extends Enum {
      readonly isNew: boolean;
      readonly asNew: NewBidder;
      readonly isExisting: boolean;
      readonly asExisting: ParaId;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 18 other locations - About 1 hr to fix
    packages/types/src/interfaces/author/types.ts on lines 8..14
    packages/types/src/interfaces/babe/types.ts on lines 167..173
    packages/types/src/interfaces/contracts/types.ts on lines 25..31
    packages/types/src/interfaces/contracts/types.ts on lines 141..147
    packages/types/src/interfaces/contracts/types.ts on lines 522..528
    packages/types/src/interfaces/democracy/types.ts on lines 10..16
    packages/types/src/interfaces/democracy/types.ts on lines 49..55
    packages/types/src/interfaces/democracy/types.ts on lines 76..82
    packages/types/src/interfaces/democracy/types.ts on lines 88..94
    packages/types/src/interfaces/democracy/types.ts on lines 127..133
    packages/types/src/interfaces/eth/types.ts on lines 367..373
    packages/types/src/interfaces/eth/types.ts on lines 427..433
    packages/types/src/interfaces/grandpa/types.ts on lines 74..80
    packages/types/src/interfaces/parachains/types.ts on lines 270..276
    packages/types/src/interfaces/state/types.ts on lines 111..117
    packages/types/src/interfaces/system/types.ts on lines 451..457
    packages/types/src/interfaces/xcm/types.ts on lines 352..358
    packages/types/src/interfaces/xcm/types.ts on lines 666..672

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

    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 DisputeState extends Struct {
      readonly validatorsFor: BitVec;
      readonly validatorsAgainst: BitVec;
      readonly start: BlockNumber;
      readonly concludedAt: Option<BlockNumber>;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 334..339
    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 ParachainsInherentData extends Struct {
      readonly bitfields: SignedAvailabilityBitfields;
      readonly backedCandidates: Vec<BackedCandidate>;
      readonly disputes: MultiDisputeStatementSet;
      readonly parentHeader: Header;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/metadata/types.ts on lines 217..222
    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 16 locations. Consider refactoring.
    Open

    export interface ParachainDispatchOrigin extends Enum {
      readonly isSigned: boolean;
      readonly isParachain: boolean;
      readonly isRoot: boolean;
      readonly type: 'Signed' | 'Parachain' | 'Root';
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 505..510
    packages/types/src/interfaces/parachains/types.ts on lines 539..544
    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 16 locations. Consider refactoring.
    Open

    export interface OccupiedCoreAssumption extends Enum {
      readonly isIncluded: boolean;
      readonly isTimedOut: boolean;
      readonly isFree: boolean;
      readonly type: 'Included' | 'TimedOut' | 'Free';
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 505..510
    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 7 locations. Consider refactoring.
    Open

    export interface Retriable extends Enum {
      readonly isNever: boolean;
      readonly isWithRetries: boolean;
      readonly asWithRetries: u32;
      readonly type: 'Never' | 'WithRetries';
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 6 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 84..89
    packages/types/src/interfaces/beefy/types.ts on lines 61..66
    packages/types/src/interfaces/eth/types.ts on lines 294..299
    packages/types/src/interfaces/genericAsset/types.ts on lines 14..19
    packages/types/src/interfaces/grandpa/types.ts on lines 37..42
    packages/types/src/interfaces/staking/types.ts on lines 130..135

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

    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 CoreOccupied extends Enum {
      readonly isParathread: boolean;
      readonly asParathread: ParathreadEntry;
      readonly isParachain: boolean;
      readonly type: 'Parathread' | 'Parachain';
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 5 other locations - About 55 mins to fix
    packages/types/src/interfaces/contracts/types.ts on lines 109..114
    packages/types/src/interfaces/contracts/types.ts on lines 117..122
    packages/types/src/interfaces/contracts/types.ts on lines 454..459
    packages/types/src/interfaces/eth/types.ts on lines 324..329
    packages/types/src/interfaces/eth/types.ts on lines 359..364

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

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

    export interface DisputeProof extends Struct {
      readonly timeSlot: DisputesTimeSlot;
      readonly kind: SlashingOffenceKind;
      readonly validatorIndex: ValidatorIndex;
      readonly validatorId: ValidatorId;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 183..188
    packages/types/src/interfaces/contractsAbi/types.ts on lines 374..379
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 211..216
    packages/types/src/interfaces/parachains/types.ts on lines 672..677
    packages/types/src/interfaces/parachains/types.ts on lines 680..685
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

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

    export interface CoreAssignment extends Struct {
      readonly core: CoreIndex;
      readonly paraId: ParaId;
      readonly kind: AssignmentKind;
      readonly groupIdx: GroupIndex;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 183..188
    packages/types/src/interfaces/contractsAbi/types.ts on lines 374..379
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 247..252
    packages/types/src/interfaces/parachains/types.ts on lines 672..677
    packages/types/src/interfaces/parachains/types.ts on lines 680..685
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

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

    export interface PvfCheckStatement extends Struct {
      readonly accept: bool;
      readonly subject: ValidationCodeHash;
      readonly sessionIndex: SessionIndex;
      readonly validatorIndex: ParaValidatorIndex;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 183..188
    packages/types/src/interfaces/contractsAbi/types.ts on lines 374..379
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 211..216
    packages/types/src/interfaces/parachains/types.ts on lines 247..252
    packages/types/src/interfaces/parachains/types.ts on lines 672..677
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

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

    export interface PersistedValidationData extends Struct {
      readonly parentHead: HeadData;
      readonly relayParentNumber: RelayChainBlockNumber;
      readonly relayParentStorageRoot: Hash;
      readonly maxPovSize: u32;
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 183..188
    packages/types/src/interfaces/contractsAbi/types.ts on lines 374..379
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 211..216
    packages/types/src/interfaces/parachains/types.ts on lines 247..252
    packages/types/src/interfaces/parachains/types.ts on lines 680..685
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

    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 BufferedSessionChange extends Struct {
      readonly applyAt: BlockNumber;
      readonly validators: Vec<ValidatorId>;
      readonly queued: Vec<ValidatorId>;
      readonly sessionIndex: SessionIndex;
    Severity: Minor
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 50 mins to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 8264..8269

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

    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 LocalValidationData extends Struct {
      readonly parentHead: HeadData;
      readonly balance: Balance;
      readonly codeUpgradeAllowed: Option<BlockNumber>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 128..132
    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 7 locations. Consider refactoring.
    Open

    export interface AttestedCandidate extends Struct {
      readonly candidate: AbridgedCandidateReceipt;
      readonly validityVotes: Vec<ValidityAttestation>;
      readonly validatorIndices: BitVec;
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 6 other locations - About 45 mins to fix
    packages/types/src/interfaces/bridges/types.ts on lines 86..90
    packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
    packages/types/src/interfaces/evm/types.ts on lines 48..52
    packages/types/src/interfaces/parachains/types.ts on lines 90..94
    packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
    packages/types/src/interfaces/session/types.ts on lines 22..26

    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 ValidationFunctionParams extends Struct {
      readonly maxCodeSize: u32;
      readonly relayChainHeight: RelayChainBlockNumber;
      readonly codeUpgradeAllowed: Option<RelayChainBlockNumber>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/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/metadata/types.ts on lines 128..132
    packages/types/src/interfaces/parachains/types.ts on lines 490..494
    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 7 locations. Consider refactoring.
    Open

    export interface BackedCandidate extends Struct {
      readonly candidate: CommittedCandidateReceipt;
      readonly validityVotes: Vec<ValidityAttestation>;
      readonly validatorIndices: BitVec;
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 6 other locations - About 45 mins to fix
    packages/types/src/interfaces/bridges/types.ts on lines 86..90
    packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
    packages/types/src/interfaces/evm/types.ts on lines 48..52
    packages/types/src/interfaces/parachains/types.ts on lines 68..72
    packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
    packages/types/src/interfaces/session/types.ts on lines 22..26

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

    export interface DisputeStatementSet extends Struct {
      readonly candidateHash: CandidateHash;
      readonly session: SessionIndex;
      readonly statements: Vec<ITuple<[DisputeStatement, ParaValidatorIndex, ValidatorSignature]>>;
    }
    Severity: Minor
    Found in packages/types/src/interfaces/parachains/types.ts and 1 other location - About 45 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 884..888

    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

    export interface ParaPastCodeMeta extends Struct {
      readonly upgradeTimes: Vec<ReplacementTimes>;
      readonly lastPruned: Option<BlockNumber>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 5 other locations - About 35 mins to fix
    packages/types/src/interfaces/grandpa/types.ts on lines 53..56
    packages/types/src/interfaces/staking/types.ts on lines 124..127
    packages/types/src/interfaces/staking/types.ts on lines 309..312
    packages/types/src/interfaces/staking/types.ts on lines 377..380
    packages/types/src/interfaces/staking/types.ts on lines 392..395

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

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

    export interface SlashingOffenceKind extends Enum {
      readonly isForInvalid: boolean;
      readonly isAgainstValid: boolean;
      readonly type: 'ForInvalid' | 'AgainstValid';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface DisputeResult extends Enum {
      readonly isValid: boolean;
      readonly isInvalid: boolean;
      readonly type: 'Valid' | 'Invalid';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface ParaScheduling extends Enum {
      readonly isAlways: boolean;
      readonly isDynamic: boolean;
      readonly type: 'Always' | 'Dynamic';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface PvfExecTimeoutKind extends Enum {
      readonly isBacking: boolean;
      readonly isApproval: boolean;
      readonly type: 'Backing' | 'Approval';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface UpgradeGoAhead extends Enum {
      readonly isAbort: boolean;
      readonly isGoAhead: boolean;
      readonly type: 'Abort' | 'GoAhead';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface PvfPrepTimeoutKind extends Enum {
      readonly isPrecheck: boolean;
      readonly isLenient: boolean;
      readonly type: 'Precheck' | 'Lenient';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface ServiceQuality extends Enum {
      readonly isOrdered: boolean;
      readonly isFast: boolean;
      readonly type: 'Ordered' | 'Fast';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface DisputeLocation extends Enum {
      readonly isLocal: boolean;
      readonly isRemote: boolean;
      readonly type: 'Local' | 'Remote';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 749..753
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

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

    export interface Scheduling extends Enum {
      readonly isAlways: boolean;
      readonly isDynamic: boolean;
      readonly type: 'Always' | 'Dynamic';
    }
    Severity: Major
    Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
    packages/types/src/interfaces/balances/types.ts on lines 31..35
    packages/types/src/interfaces/bridges/types.ts on lines 44..48
    packages/types/src/interfaces/nompools/types.ts on lines 7..11
    packages/types/src/interfaces/parachains/types.ts on lines 240..244
    packages/types/src/interfaces/parachains/types.ts on lines 255..259
    packages/types/src/interfaces/parachains/types.ts on lines 641..645
    packages/types/src/interfaces/parachains/types.ts on lines 688..692
    packages/types/src/interfaces/parachains/types.ts on lines 695..699
    packages/types/src/interfaces/parachains/types.ts on lines 763..767
    packages/types/src/interfaces/parachains/types.ts on lines 806..810
    packages/types/src/interfaces/parachains/types.ts on lines 896..900
    packages/types/src/interfaces/runtime/types.ts on lines 122..126
    packages/types/src/interfaces/runtime/types.ts on lines 271..275
    packages/types/src/interfaces/system/types.ts on lines 444..448
    packages/types/src/interfaces/xcm/types.ts on lines 119..123
    packages/types/src/interfaces/xcm/types.ts on lines 478..482
    packages/types/src/interfaces/xcm/types.ts on lines 636..640

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

    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