polkadot-js/api

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

Summary

Maintainability
F
1 wk
Test Coverage

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

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

import type { Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts - About 2 days to fix

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

    export interface JunctionsV1 extends Enum {
      readonly isHere: boolean;
      readonly isX1: boolean;
      readonly asX1: JunctionV1;
      readonly isX2: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 day to fix
    packages/types/src/interfaces/xcm/types.ts on lines 422..441

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

    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 MultiLocationV0 extends Enum {
      readonly isHere: boolean;
      readonly isX1: boolean;
      readonly asX1: JunctionV0;
      readonly isX2: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 day to fix
    packages/types/src/interfaces/xcm/types.ts on lines 249..268

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

    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 JunctionV1 extends Enum {
      readonly isParachain: boolean;
      readonly asParachain: Compact<u32>;
      readonly isAccountId32: boolean;
      readonly asAccountId32: {
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 day to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 308..339

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

    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

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

    export interface AssetInstanceV1 extends Enum {
      readonly isUndefined: boolean;
      readonly isIndex: boolean;
      readonly asIndex: Compact<u128>;
      readonly isArray4: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 5 hrs to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1476..1491

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

    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

      readonly type: 'Undefined' | 'Overflow' | 'Unimplemented' | 'UnhandledXcmVersion' | 'UnhandledXcmMessage' | 'UnhandledEffect' | 'EscalationOfPrivilege' | 'UntrustedReserveLocation' | 'UntrustedTeleportLocation' | 'DestinationBufferOverflow' | 'SendFailed' | 'CannotReachDestination' | 'MultiLocationFull' | 'FailedToDecode' | 'BadOrigin' | 'ExceedsMaxMessageSize' | 'FailedToTransactAsset' | 'WeightLimitReached' | 'Wildcard' | 'TooMuchWeightRequired' | 'NotHoldingFees' | 'WeightNotComputable' | 'Barrier' | 'NotWithdrawable' | 'LocationCannotHold' | 'TooExpensive' | 'AssetNotFound' | 'DestinationUnsupported' | 'RecursionLimitReached';
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 3 hrs to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 2841..2841

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

    export interface VersionedMultiAsset extends Enum {
      readonly isV0: boolean;
      readonly asV0: MultiAssetV0;
      readonly isV1: boolean;
      readonly asV1: MultiAssetV1;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/parachains/types.ts on lines 454..462
    packages/types/src/interfaces/runtime/types.ts on lines 234..242
    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 6 locations. Consider refactoring.
    Open

    export interface VersionedMultiLocation extends Enum {
      readonly isV0: boolean;
      readonly asV0: MultiLocationV0;
      readonly isV1: boolean;
      readonly asV1: MultiLocationV1;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/parachains/types.ts on lines 454..462
    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 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 6 locations. Consider refactoring.
    Open

    export interface VersionedXcm extends Enum {
      readonly isV0: boolean;
      readonly asV0: XcmV0;
      readonly isV1: boolean;
      readonly asV1: XcmV1;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/parachains/types.ts on lines 454..462
    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

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

    export interface ResponseV2 extends Enum {
      readonly isNull: boolean;
      readonly isAssets: boolean;
      readonly asAssets: MultiAssetsV2;
      readonly isExecutionResult: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/parachains/types.ts on lines 951..958

    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

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

    export interface VersionMigrationStage extends Enum {
      readonly isMigrateSupportedVersion: boolean;
      readonly isMigrateVersionNotifiers: boolean;
      readonly isNotifyCurrentTargets: boolean;
      readonly asNotifyCurrentTargets: Option<Bytes>;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 hr to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 3241..3248

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

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

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

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

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

    Refactorings

    Further Reading

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

    export interface OriginKindV0 extends Enum {
      readonly isNative: boolean;
      readonly isSovereignAccount: boolean;
      readonly isSuperuser: boolean;
      readonly isXcm: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 4 other locations - About 1 hr to fix
    packages/types/src/interfaces/eth/types.ts on lines 285..291
    packages/types/src/interfaces/mixnet/types.ts on lines 24..30
    packages/types/src/interfaces/staking/types.ts on lines 169..175
    packages/types/src/interfaces/xcm/types.ts on lines 901..907

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 65.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface XcmOriginKind extends Enum {
      readonly isNative: boolean;
      readonly isSovereignAccount: boolean;
      readonly isSuperuser: boolean;
      readonly isXcm: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 4 other locations - About 1 hr to fix
    packages/types/src/interfaces/eth/types.ts on lines 285..291
    packages/types/src/interfaces/mixnet/types.ts on lines 24..30
    packages/types/src/interfaces/staking/types.ts on lines 169..175
    packages/types/src/interfaces/xcm/types.ts on lines 463..469

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 65.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asBuyExecution: {
        readonly fees: MultiAssetV1;
        readonly weight: u64;
        readonly debt: u64;
        readonly haltOnError: bool;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 4 other locations - About 1 hr to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 1917..1923
    packages/types-augment/src/lookup/types-substrate.ts on lines 2205..2211
    packages/types-augment/src/lookup/types-substrate.ts on lines 4669..4675
    packages/types/src/interfaces/xcm/types.ts on lines 830..836

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

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asBuyExecution: {
        readonly fees: MultiAssetV0;
        readonly weight: u64;
        readonly debt: u64;
        readonly haltOnError: bool;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 4 other locations - About 1 hr to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 1917..1923
    packages/types-augment/src/lookup/types-substrate.ts on lines 2205..2211
    packages/types-augment/src/lookup/types-substrate.ts on lines 4669..4675
    packages/types/src/interfaces/xcm/types.ts on lines 880..886

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

    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 MultiAssetFilterV1 extends Enum {
      readonly isDefinite: boolean;
      readonly asDefinite: MultiAssetsV1;
      readonly isWild: boolean;
      readonly asWild: WildMultiAssetV1;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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 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 XcmAssetId extends Enum {
      readonly isConcrete: boolean;
      readonly asConcrete: MultiLocation;
      readonly isAbstract: boolean;
      readonly asAbstract: Bytes;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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

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

    export interface QueueConfigData extends Struct {
      readonly suspendThreshold: u32;
      readonly dropThreshold: u32;
      readonly resumeThreshold: u32;
      readonly thresholdWeight: Weight;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 17 other locations - About 1 hr to fix
    packages/types/src/interfaces/assets/types.ts on lines 50..56
    packages/types/src/interfaces/babe/types.ts on lines 137..143
    packages/types/src/interfaces/bridges/types.ts on lines 120..126
    packages/types/src/interfaces/contracts/types.ts on lines 73..79
    packages/types/src/interfaces/contracts/types.ts on lines 132..138
    packages/types/src/interfaces/contracts/types.ts on lines 150..156
    packages/types/src/interfaces/contracts/types.ts on lines 173..179
    packages/types/src/interfaces/contracts/types.ts on lines 462..468
    packages/types/src/interfaces/contracts/types.ts on lines 510..516
    packages/types/src/interfaces/democracy/types.ts on lines 111..117
    packages/types/src/interfaces/democracy/types.ts on lines 136..142
    packages/types/src/interfaces/grandpa/types.ts on lines 132..138
    packages/types/src/interfaces/grandpa/types.ts on lines 172..178
    packages/types/src/interfaces/imOnline/types.ts on lines 16..22
    packages/types/src/interfaces/purchase/types.ts on lines 8..14
    packages/types/src/interfaces/system/types.ts on lines 39..45
    packages/types/src/interfaces/system/types.ts on lines 360..366

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

    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 WildMultiAssetV1 extends Enum {
      readonly isAll: boolean;
      readonly isAllOf: boolean;
      readonly asAllOf: {
        readonly id: XcmAssetId;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 hr to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1562..1570

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

    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

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

    export interface NetworkId extends Enum {
      readonly isAny: boolean;
      readonly isNamed: boolean;
      readonly asNamed: Bytes;
      readonly isPolkadot: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 hr to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 342..349

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

    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 XcmpMessageFormat extends Enum {
      readonly isConcatenatedVersionedXcm: boolean;
      readonly isConcatenatedEncodedBlob: boolean;
      readonly isSignals: boolean;
      readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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

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

      readonly asDepositReserveAsset: {
        readonly assets: MultiAssetFilterV1;
        readonly maxAssets: u32;
        readonly dest: MultiLocationV1;
        readonly effects: Vec<XcmOrderV1>;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 7 other locations - About 1 hr to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 2614..2619
    packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
    packages/types-augment/src/lookup/types-substrate.ts on lines 1825..1830
    packages/types-augment/src/lookup/types-substrate.ts on lines 2012..2017
    packages/types-augment/src/lookup/types-substrate.ts on lines 4475..4480
    packages/types-augment/src/lookup/types-substrate.ts on lines 4542..4547
    packages/types-augment/src/lookup/types-substrate.ts on lines 6451..6456

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

      readonly asReportError: {
        readonly queryId: Compact<u64>;
        readonly dest: MultiLocationV2;
        readonly maxResponseWeight: Compact<u64>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 824..828
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asInitiateReserveWithdraw: {
        readonly assets: Vec<MultiAssetV0>;
        readonly reserve: MultiLocationV0;
        readonly effects: Vec<XcmOrderV0>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 824..828
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asQueryHolding: {
        readonly queryId: Compact<u64>;
        readonly dest: MultiLocationV0;
        readonly assets: Vec<MultiAssetV0>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asInitiateTeleport: {
        readonly assets: Vec<MultiAssetV0>;
        readonly dest: MultiLocationV0;
        readonly effects: Vec<XcmOrderV0>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 824..828
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asQueryResponse: {
        readonly queryId: Compact<u64>;
        readonly response: ResponseV2;
        readonly maxWeight: Compact<u64>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 824..828
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asTransferReserveAsset: {
        readonly assets: Vec<MultiAssetV0>;
        readonly dest: MultiLocationV0;
        readonly effects: Vec<XcmOrderV0>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 801..805
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 824..828

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asDepositReserveAsset: {
        readonly assets: Vec<MultiAssetV0>;
        readonly dest: MultiLocationV0;
        readonly effects: Vec<XcmOrderV0>;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 16 other locations - About 50 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1337..1341
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1379..1383
    packages/types-augment/src/lookup/types-substrate.ts on lines 3087..3091
    packages/types-augment/src/lookup/types-substrate.ts on lines 3949..3953
    packages/types-augment/src/lookup/types-substrate.ts on lines 4048..4052
    packages/types-augment/src/lookup/types-substrate.ts on lines 4054..4058
    packages/types-augment/src/lookup/types-substrate.ts on lines 4060..4064
    packages/types-augment/src/lookup/types-substrate.ts on lines 4066..4070
    packages/types-augment/src/lookup/types-substrate.ts on lines 4143..4147
    packages/types-augment/src/lookup/types-substrate.ts on lines 5174..5178
    packages/types/src/interfaces/xcm/types.ts on lines 134..138
    packages/types/src/interfaces/xcm/types.ts on lines 176..180
    packages/types/src/interfaces/xcm/types.ts on lines 812..816
    packages/types/src/interfaces/xcm/types.ts on lines 818..822
    packages/types/src/interfaces/xcm/types.ts on lines 824..828
    packages/types/src/interfaces/xcm/types.ts on lines 945..949

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface ResponseV0 extends Enum {
      readonly isAssets: boolean;
      readonly asAssets: Vec<MultiAssetV0>;
      readonly type: 'Assets';
    }
    Severity: Minor
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 40 mins to fix
    packages/types/src/interfaces/runtime/types.ts on lines 69..73

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

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

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

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

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

    Refactorings

    Further Reading

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

      readonly asQueryHolding: {
        readonly queryId: Compact<u64>;
        readonly dest: MultiLocationV1;
        readonly assets: MultiAssetFilterV1;
      } & Struct;
    Severity: Major
    Found in packages/types/src/interfaces/xcm/types.ts and 5 other locations - About 35 mins to fix
    packages/types-augment/src/lookup/types-substrate.ts on lines 3669..3673
    packages/types-augment/src/lookup/types-substrate.ts on lines 4019..4023
    packages/types-augment/src/lookup/types-substrate.ts on lines 4154..4158
    packages/types-augment/src/lookup/types-substrate.ts on lines 8368..8372
    packages/types/src/interfaces/metadata/types.ts on lines 595..599

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface WeightLimitV2 extends Enum {
      readonly isUnlimited: boolean;
      readonly isLimited: boolean;
      readonly asLimited: Compact<u64>;
      readonly type: 'Unlimited' | 'Limited';
    Severity: Minor
    Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 35 mins to fix
    packages/types-augment/src/lookup/types-polkadot.ts on lines 1580..1585

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface OutboundStatus extends Enum {
      readonly isOk: boolean;
      readonly isSuspended: boolean;
      readonly type: 'Ok' | 'Suspended';
    }
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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 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 InboundStatus extends Enum {
      readonly isOk: boolean;
      readonly isSuspended: boolean;
      readonly type: 'Ok' | 'Suspended';
    }
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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 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 WildFungibilityV1 extends Enum {
      readonly isFungible: boolean;
      readonly isNonFungible: boolean;
      readonly type: 'Fungible' | 'NonFungible';
    }
    Severity: Major
    Found in packages/types/src/interfaces/xcm/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/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

    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