polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

export interface ElectionCompute extends Enum {
  readonly isOnChain: boolean;
  readonly isSigned: boolean;
  readonly isUnsigned: boolean;
  readonly type: 'OnChain' | 'Signed' | 'Unsigned';
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asAssetTxFeePaid: {
      readonly who: AccountId32;
      readonly actualFee: u128;
      readonly tip: u128;
      readonly assetId: Option<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface SocietyVote extends Enum {
  readonly isSkeptic: boolean;
  readonly isReject: boolean;
  readonly isApprove: boolean;
  readonly type: 'Skeptic' | 'Reject' | 'Approve';
Severity: Major
Found in packages/types/src/interfaces/society/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asInvalidQuerier: {
      readonly origin: StagingXcmV4Location;
      readonly queryId: u64;
      readonly expectedQuerier: StagingXcmV4Location;
      readonly maybeActualQuerier: Option<StagingXcmV4Location>;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface ArithmeticError extends Enum {
  readonly isUnderflow: boolean;
  readonly isOverflow: boolean;
  readonly isDivisionByZero: boolean;
  readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';
Severity: Major
Found in packages/types/src/interfaces/system/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface ParachainDispatchOrigin extends Enum {
  readonly isSigned: boolean;
  readonly isParachain: boolean;
  readonly isRoot: boolean;
  readonly type: 'Signed' | 'Parachain' | 'Root';
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface DispatchClass extends Enum {
  readonly isNormal: boolean;
  readonly isOperational: boolean;
  readonly isMandatory: boolean;
  readonly type: 'Normal' | 'Operational' | 'Mandatory';
Severity: Major
Found in packages/types/src/interfaces/system/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface XcmpMessageFormat extends Enum {
  readonly isConcatenatedVersionedXcm: boolean;
  readonly isConcatenatedEncodedBlob: boolean;
  readonly isSignals: boolean;
  readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface OccupiedCoreAssumption extends Enum {
  readonly isIncluded: boolean;
  readonly isTimedOut: boolean;
  readonly isFree: boolean;
  readonly type: 'Included' | 'TimedOut' | 'Free';
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface TransactionSource extends Enum {
  readonly isInBlock: boolean;
  readonly isLocal: boolean;
  readonly isExternal: boolean;
  readonly type: 'InBlock' | 'Local' | 'External';
Severity: Major
Found in packages/types/src/interfaces/txqueue/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 10..15
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asApproveTransfer: {
      readonly collection: u32;
      readonly item: u32;
      readonly delegate: MultiAddress;
      readonly maybeDeadline: Option<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export interface AllowedSlots extends Enum {
  readonly isPrimarySlots: boolean;
  readonly isPrimaryAndSecondaryPlainSlots: boolean;
  readonly isPrimaryAndSecondaryVRFSlots: boolean;
  readonly type: 'PrimarySlots' | 'PrimaryAndSecondaryPlainSlots' | 'PrimaryAndSecondaryVRFSlots';
Severity: Major
Found in packages/types/src/interfaces/babe/types.ts and 15 other locations - About 1 hr to fix
packages/types/src/interfaces/balances/types.ts on lines 38..43
packages/types/src/interfaces/bridges/types.ts on lines 102..107
packages/types/src/interfaces/contractsAbi/types.ts on lines 107..112
packages/types/src/interfaces/metadata/types.ts on lines 505..510
packages/types/src/interfaces/parachains/types.ts on lines 539..544
packages/types/src/interfaces/parachains/types.ts on lines 573..578
packages/types/src/interfaces/society/types.ts on lines 25..30
packages/types/src/interfaces/society/types.ts on lines 33..38
packages/types/src/interfaces/staking/types.ts on lines 95..100
packages/types/src/interfaces/statement/types.ts on lines 7..12
packages/types/src/interfaces/statement/types.ts on lines 15..20
packages/types/src/interfaces/system/types.ts on lines 64..69
packages/types/src/interfaces/system/types.ts on lines 103..108
packages/types/src/interfaces/txqueue/types.ts on lines 9..14
packages/types/src/interfaces/xcm/types.ts on lines 1969..1974

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asItemPriceSet: {
      readonly collection: u32;
      readonly item: u32;
      readonly price: u128;
      readonly whitelistedBuyer: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asItemPriceSet: {
      readonly collection: u32;
      readonly item: u32;
      readonly price: u128;
      readonly whitelistedBuyer: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asMint: {
      readonly collection: u32;
      readonly item: u32;
      readonly mintTo: MultiAddress;
      readonly witnessData: Option<PalletNftsMintWitness>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

  readonly asDepositReserveAsset: {
    readonly assets: MultiAssetFilterV1;
    readonly maxAssets: u32;
    readonly dest: MultiLocationV1;
    readonly effects: Vec<XcmOrderV1>;
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asRenewable: {
      readonly core: u16;
      readonly price: u128;
      readonly begin: u32;
      readonly workload: Vec<PalletBrokerScheduleItem>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asSetTeam: {
      readonly id: Compact<u32>;
      readonly issuer: MultiAddress;
      readonly admin: MultiAddress;
      readonly freezer: MultiAddress;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3480..3485
packages/types-augment/src/lookup/types-substrate.ts on lines 4116..4121
packages/types-augment/src/lookup/types-substrate.ts on lines 5368..5373

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    readonly asSetMetadata: {
      readonly id: Compact<u32>;
      readonly name: Bytes;
      readonly symbol: Bytes;
      readonly decimals: u8;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3480..3485
packages/types-augment/src/lookup/types-substrate.ts on lines 4109..4114
packages/types-augment/src/lookup/types-substrate.ts on lines 5368..5373

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

                  if (!skipInspectType) {
                    it(`output ${type} is known`, (): void => {
                      expect(() => inspectType(type)).not.toThrow();
                    });
                  }
Severity: Major
Found in packages/types/src/interfaces/definitions.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/definitions.spec.ts on lines 89..93

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language