polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    it('constructs with Vote aye is true, conviction is Locked4x', (): void => {
      expect(
        new GenericVote(registry, {
          aye: true,
          conviction: 'Locked4x'
Severity: Major
Found in packages/types/src/generic/Vote.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/generic/Vote.spec.ts on lines 89..96

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

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 type { AnyFunction, AnyJson, AnyNumber, AnyString, AnyTuple, AnyU8a, ArgsDef, BareOpts, Codec, CodecClass, CodecTo, Inspect } from '@polkadot/types-codec/types';
Severity: Major
Found in packages/types/src/types/codec.ts and 1 other location - About 1 hr to fix
packages/types/src/types/interfaces.ts on lines 9..9

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

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

    it('constructs from hex', (): void => {
      expect(
        new (U8aFixed.with(32))(registry, '0x01020304').toU8a()
      ).toEqual(
        new Uint8Array([0x01, 0x02, 0x03, 0x04])
Severity: Major
Found in packages/types-codec/src/extended/U8aFixed.spec.ts and 1 other location - About 1 hr to fix
packages/types-codec/src/extended/U8aFixed.spec.ts on lines 54..60

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

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

    it('constructs with Vote aye is false, conviction is None', (): void => {
      expect(
        new GenericVote(registry, {
          aye: false,
          conviction: 'None'
Severity: Major
Found in packages/types/src/generic/Vote.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/generic/Vote.spec.ts on lines 98..105

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

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

  StagingXcmV4AssetWildAsset: {
    _enum: {
      All: 'Null',
      AllOf: {
        id: 'StagingXcmV4AssetAssetId',
Severity: Major
Found in packages/types-augment/src/lookup/polkadot.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/polkadot.ts on lines 1992..2006

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

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

  it('should return known errors', (): void => {
    expect(events['balances']['Transfer']).toBeDefined();
    expect(events['system']['CodeUpdated']).toBeDefined();
  });
Severity: Major
Found in packages/types/src/metadata/decorate/events/index.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/metadata/decorate/errors/index.spec.ts on lines 20..23

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

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

  interface PalletRankedCollectiveVoteRecord extends Enum {
    readonly isAye: boolean;
    readonly asAye: u32;
    readonly isNay: boolean;
    readonly asNay: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface XcmV3MultiassetMultiAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: XcmV3MultiassetMultiAssets;
    readonly isWild: boolean;
    readonly asWild: XcmV3MultiassetWildMultiAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface XcmVersionedAssetId extends Enum {
    readonly isV3: boolean;
    readonly asV3: XcmV3MultiassetAssetId;
    readonly isV4: boolean;
    readonly asV4: StagingXcmV4AssetAssetId;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface XcmV2MultiassetMultiAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: XcmV2MultiassetMultiAssets;
    readonly isWild: boolean;
    readonly asWild: XcmV2MultiassetWildMultiAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PolkadotPrimitivesV7ValidityAttestation extends Enum {
    readonly isImplicit: boolean;
    readonly asImplicit: PolkadotPrimitivesV7ValidatorAppSignature;
    readonly isExplicit: boolean;
    readonly asExplicit: PolkadotPrimitivesV7ValidatorAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PolkadotRuntimeRuntimeHoldReason extends Enum {
    readonly isPreimage: boolean;
    readonly asPreimage: PalletPreimageHoldReason;
    readonly isStateTrieMigration: boolean;
    readonly asStateTrieMigration: PalletStateTrieMigrationHoldReason;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface FrameSupportScheduleDispatchTime extends Enum {
    readonly isAt: boolean;
    readonly asAt: u32;
    readonly isAfter: boolean;
    readonly asAfter: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface XcmV2MultiassetAssetId extends Enum {
    readonly isConcrete: boolean;
    readonly asConcrete: XcmV2MultiLocation;
    readonly isAbstract: boolean;
    readonly asAbstract: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PalletAllianceUnscrupulousItem extends Enum {
    readonly isAccountId: boolean;
    readonly asAccountId: AccountId32;
    readonly isWebsite: boolean;
    readonly asWebsite: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface StagingXcmV4AssetAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: StagingXcmV4AssetAssets;
    readonly isWild: boolean;
    readonly asWild: StagingXcmV4AssetWildAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PolkadotPrimitivesV7DisputeStatement extends Enum {
    readonly isValid: boolean;
    readonly asValid: PolkadotPrimitivesV7ValidDisputeStatementKind;
    readonly isInvalid: boolean;
    readonly asInvalid: PolkadotPrimitivesV7InvalidDisputeStatementKind;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PolkadotPrimitivesV6DisputeStatement extends Enum {
    readonly isValid: boolean;
    readonly asValid: PolkadotPrimitivesV6ValidDisputeStatementKind;
    readonly isInvalid: boolean;
    readonly asInvalid: PolkadotPrimitivesV6InvalidDisputeStatementKind;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface PolkadotPrimitivesV6ValidityAttestation extends Enum {
    readonly isImplicit: boolean;
    readonly asImplicit: PolkadotPrimitivesV6ValidatorAppSignature;
    readonly isExplicit: boolean;
    readonly asExplicit: PolkadotPrimitivesV6ValidatorAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

  interface KitchensinkRuntimeDynamicParamsStorageParametersValue extends Enum {
    readonly isBaseDeposit: boolean;
    readonly asBaseDeposit: u128;
    readonly isByteDeposit: boolean;
    readonly asByteDeposit: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

Severity
Category
Status
Source
Language