polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

  interface PalletElectionProviderMultiPhasePhase extends Enum {
    readonly isOff: boolean;
    readonly isSigned: boolean;
    readonly isUnsigned: boolean;
    readonly asUnsigned: ITuple<[bool, u32]>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/staking/types.ts on lines 103..110

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

interface PalletSchedulerScheduledV3 extends Codec {
  maybeId: Option<Bytes>;
  priority: u8;
  call: FrameSupportScheduleMaybeHashed;
  maybePeriodic: Option<ITuple<[u32, u32]>>;
Severity: Major
Found in packages/api-derive/src/democracy/dispatchQueue.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7785..7791

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNftsAttributeNamespace extends Enum {
    readonly isPallet: boolean;
    readonly isCollectionOwner: boolean;
    readonly isItemOwner: boolean;
    readonly isAccount: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2269..2276

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('has valid toPrimitive', (): void => {
      expect(new Raw(registry, 'testing').toPrimitive()).toEqual('testing');
      expect(new Raw(registry, '0xe4bda0e5a5bd').toPrimitive()).toEqual('0xe4bda0e5a5bd');
    });
Severity: Major
Found in packages/types-codec/src/native/Raw.spec.ts and 1 other location - About 1 hr to fix
packages/types-codec/src/native/Raw.spec.ts on lines 94..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    readonly asRenewed: {
      readonly who: AccountId32;
      readonly price: u128;
      readonly oldCore: u16;
      readonly core: u16;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/api-augment/src/substrate/events.ts on lines 526..526

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('has valid toUtf8', (): void => {
      expect(new Raw(registry, 'Приветствую, ми').toUtf8()).toEqual('Приветствую, ми');
      expect(new Raw(registry, '0xe4bda0e5a5bd').toUtf8()).toEqual('你好');
    });
Severity: Major
Found in packages/types-codec/src/native/Raw.spec.ts and 1 other location - About 1 hr to fix
packages/types-codec/src/native/Raw.spec.ts on lines 89..92

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    {
      methods: {
        can_author: {
          description: 'The runtime api used to predict whether a Nimbus author will be eligible in the given slot',
          params: [
Severity: Major
Found in packages/types/src/interfaces/nimbus/runtime.ts and 2 other locations - About 1 hr to fix
packages/types/src/interfaces/nimbus/runtime.ts on lines 9..31
packages/types/src/interfaces/txqueue/runtime.ts on lines 8..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  interface StagingXcmExecutorAssetTransferTransferType extends Enum {
    readonly isTeleport: boolean;
    readonly isLocalReserve: boolean;
    readonly isDestinationReserve: boolean;
    readonly isRemoteReserve: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2092..2099

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

export interface Si1Field extends Struct {
  readonly name: Option<Text>;
  readonly type: Si1LookupTypeId;
  readonly typeName: Option<Text>;
  readonly docs: Vec<Text>;
Severity: Major
Found in packages/types/src/interfaces/scaleInfo/types.ts and 2 other locations - About 1 hr to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 21..26
packages/types/src/interfaces/scaleInfo/types.ts on lines 7..12

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletSchedulerScheduled extends Struct {
    readonly maybeId: Option<U8aFixed>;
    readonly priority: u8;
    readonly call: FrameSupportPreimagesBounded;
    readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/api-derive/src/democracy/dispatchQueue.ts on lines 23..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletContractsWasmCodeInfo extends Struct {
    readonly owner: AccountId32;
    readonly deposit: Compact<u128>;
    readonly refcount: Compact<u64>;
    readonly determinism: PalletContractsWasmDeterminism;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 8457..8463

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletBagsListListNode extends Struct {
    readonly id: AccountId32;
    readonly prev: Option<AccountId32>;
    readonly next: Option<AccountId32>;
    readonly bagUpper: u64;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7443..7449

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

  [
    13800015,
    9340,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    12301871,
    9280,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13761100,
    9350,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    15680713,
    9340,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    12841034,
    9300,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13483497,
    9330,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13649433,
    9340,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    15426015,
    9320,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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