polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

export interface PendingChange extends Struct {
  readonly nextAuthorities: AuthorityList;
  readonly delay: BlockNumber;
  readonly canonHeight: BlockNumber;
  readonly canonHash: BlockHash;
Severity: Major
Found in packages/types/src/interfaces/grandpa/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface AccountInfoWithTripleRefCount extends Struct {
  readonly nonce: Index;
  readonly consumers: RefCount;
  readonly providers: RefCount;
  readonly sufficients: RefCount;
Severity: Major
Found in packages/types/src/interfaces/system/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface ContractInstantiateResultU64 extends Struct {
  readonly gasConsumed: u64;
  readonly gasRequired: u64;
  readonly storageDeposit: StorageDeposit;
  readonly debugMessage: Text;
Severity: Major
Found in packages/types/src/interfaces/contracts/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface VersionedResponse extends Struct {
  readonly V0: ResponseV0;
  readonly V1: ResponseV1;
  readonly V2: ResponseV2;
  readonly V3: ResponseV3;
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface OutboundPayload extends Struct {
  readonly specVersion: u32;
  readonly weight: Weight;
  readonly origin: CallOrigin;
  readonly dispatchFeePayment: DispatchFeePayment;
Severity: Major
Found in packages/types/src/interfaces/bridges/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface ContractInstantiateResult extends Struct {
  readonly gasConsumed: WeightV2;
  readonly gasRequired: WeightV2;
  readonly storageDeposit: StorageDeposit;
  readonly debugMessage: Text;
Severity: Major
Found in packages/types/src/interfaces/contracts/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

export interface ScheduleTo264 extends Struct {
  readonly version: u32;
  readonly enablePrintln: bool;
  readonly limits: LimitsTo264;
  readonly instructionWeights: InstructionWeights;
Severity: Major
Found in packages/types/src/interfaces/contracts/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStakingForcing extends Enum {
    readonly isNotForcing: boolean;
    readonly isForceNew: boolean;
    readonly isForceNone: boolean;
    readonly isForceAlways: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface KitchensinkRuntimeProxyType extends Enum {
    readonly isAny: boolean;
    readonly isNonTransfer: boolean;
    readonly isGovernance: boolean;
    readonly isStaking: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface XcmV2OriginKind extends Enum {
    readonly isNative: boolean;
    readonly isSovereignAccount: boolean;
    readonly isSuperuser: boolean;
    readonly isXcm: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletBabeError extends Enum {
    readonly isInvalidEquivocationProof: boolean;
    readonly isInvalidKeyOwnershipProof: boolean;
    readonly isDuplicateOffenceReport: boolean;
    readonly isInvalidConfiguration: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNftFractionalizationError extends Enum {
    readonly isIncorrectAssetId: boolean;
    readonly isNoPermission: boolean;
    readonly isNftNotFound: boolean;
    readonly isNftNotFractionalized: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletBagsListListListError extends Enum {
    readonly isDuplicate: boolean;
    readonly isNotHeavier: boolean;
    readonly isNotInSameBag: boolean;
    readonly isNodeNotFound: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNominationPoolsClaimPermission extends Enum {
    readonly isPermissioned: boolean;
    readonly isPermissionlessCompound: boolean;
    readonly isPermissionlessWithdraw: boolean;
    readonly isPermissionlessAll: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletAssetConversionOpsError extends Enum {
    readonly isInvalidAssetPair: boolean;
    readonly isPoolNotFound: boolean;
    readonly isZeroBalance: boolean;
    readonly isPartialTransfer: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface XcmV3OriginKind extends Enum {
    readonly isNative: boolean;
    readonly isSovereignAccount: boolean;
    readonly isSuperuser: boolean;
    readonly isXcm: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletTxPauseError extends Enum {
    readonly isIsPaused: boolean;
    readonly isIsUnpaused: boolean;
    readonly isUnpausable: boolean;
    readonly isNotFound: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8287..8293
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNftsPalletFeature extends Enum {
    readonly isTrading: boolean;
    readonly isAttributes: boolean;
    readonly isApprovals: boolean;
    readonly isSwaps: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 10 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 385..391
packages/types-augment/src/lookup/types-polkadot.ts on lines 1570..1576
packages/types-augment/src/lookup/types-substrate.ts on lines 549..555
packages/types-augment/src/lookup/types-substrate.ts on lines 1350..1356
packages/types-augment/src/lookup/types-substrate.ts on lines 5526..5532
packages/types-augment/src/lookup/types-substrate.ts on lines 6890..6896
packages/types-augment/src/lookup/types-substrate.ts on lines 8354..8360
packages/types-augment/src/lookup/types-substrate.ts on lines 8479..8485
packages/types-augment/src/lookup/types-substrate.ts on lines 8982..8988
packages/types-augment/src/lookup/types-substrate.ts on lines 9125..9131

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  BodyIdV2: {
    _enum: {
      Unit: 'Null',
      Named: 'Bytes',
      Index: 'Compact<u32>',
Severity: Major
Found in packages/types/src/interfaces/xcm/v2.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/author/definitions.ts on lines 20..33
packages/types/src/interfaces/system/definitions.ts on lines 93..106
packages/types/src/interfaces/xcm/v3.ts on lines 16..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 62.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language