polkadot-js/api

View on GitHub

Showing 2,327 of 2,507 total issues

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

    QueryStatus: {
      _enum: {
        Pending: {
          responder: 'VersionedMultiLocation',
          maybeNotify: 'Option<(u8, u8)>',
Severity: Minor
Found in packages/types/src/interfaces/xcm/definitions.ts and 1 other location - About 35 mins to fix
packages/types-augment/src/lookup/substrate.ts on lines 2032..2044

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

  PalletBagsListEvent: {
    _enum: {
      Rebagged: {
        who: 'AccountId32',
        from: 'u64',
Severity: Minor
Found in packages/types-augment/src/lookup/substrate.ts and 1 other location - About 35 mins to fix
packages/types/src/interfaces/xcm/definitions.ts on lines 105..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

  PalletDemocracyVoteAccountVote: {
    _enum: {
      Standard: {
        vote: 'Vote',
        balance: 'u128',
Severity: Minor
Found in packages/types-augment/src/lookup/substrate.ts and 1 other location - About 35 mins to fix
packages/types-augment/src/lookup/kusama.ts on lines 169..180

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

export interface BabeEpochConfiguration extends Struct {
  readonly c: ITuple<[u64, u64]>;
  readonly allowedSlots: AllowedSlots;
}
Severity: Minor
Found in packages/types/src/interfaces/babe/types.ts and 1 other location - About 35 mins to fix
packages/types/src/interfaces/babe/types.ts on lines 92..95

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

export interface SessionKeys8B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
Severity: Minor
Found in packages/types/src/interfaces/session/types.ts and 1 other location - About 35 mins to fix
packages/types/src/interfaces/session/types.ts on lines 65..65

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

export interface NextConfigDescriptorV1 extends Struct {
  readonly c: ITuple<[u64, u64]>;
  readonly allowedSlots: AllowedSlots;
}
Severity: Minor
Found in packages/types/src/interfaces/babe/types.ts and 1 other location - About 35 mins to fix
packages/types/src/interfaces/babe/types.ts on lines 24..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

  PolkadotRuntimeParachainsAssignerOnDemandPalletCall: {
    _enum: {
      place_order_allow_death: {
        maxAmount: 'u128',
        paraId: 'u32',
Severity: Minor
Found in packages/types-augment/src/lookup/kusama.ts and 1 other location - About 35 mins to fix
packages/types-augment/src/lookup/substrate.ts on lines 605..616

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

mockU32EnumMap.set(new MockEnum(registry, { Key2: new MockStruct(registry, { int: -1, text: 'b' }) }), new U32(registry, 7));
Severity: Minor
Found in packages/types-codec/src/extended/BTreeMap.spec.ts and 1 other location - About 35 mins to fix
packages/types-codec/src/extended/BTreeMap.spec.ts on lines 57..57

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

export interface SessionKeys8 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
Severity: Minor
Found in packages/types/src/interfaces/session/types.ts and 1 other location - About 35 mins to fix
packages/types/src/interfaces/session/types.ts on lines 68..68

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

export interface InboundStatus extends Enum {
  readonly isOk: boolean;
  readonly isSuspended: boolean;
  readonly type: 'Ok' | 'Suspended';
}
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface DisputeResult extends Enum {
  readonly isValid: boolean;
  readonly isInvalid: boolean;
  readonly type: 'Valid' | 'Invalid';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface WildFungibilityV1 extends Enum {
  readonly isFungible: boolean;
  readonly isNonFungible: boolean;
  readonly type: 'Fungible' | 'NonFungible';
}
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface PvfExecTimeoutKind extends Enum {
  readonly isBacking: boolean;
  readonly isApproval: boolean;
  readonly type: 'Backing' | 'Approval';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface SlashingOffenceKind extends Enum {
  readonly isForInvalid: boolean;
  readonly isAgainstValid: boolean;
  readonly type: 'ForInvalid' | 'AgainstValid';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface ServiceQuality extends Enum {
  readonly isOrdered: boolean;
  readonly isFast: boolean;
  readonly type: 'Ordered' | 'Fast';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface DispatchFeePayment extends Enum {
  readonly isAtSourceChain: boolean;
  readonly isAtTargetChain: boolean;
  readonly type: 'AtSourceChain' | 'AtTargetChain';
}
Severity: Major
Found in packages/types/src/interfaces/bridges/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface PvfPrepTimeoutKind extends Enum {
  readonly isPrecheck: boolean;
  readonly isLenient: boolean;
  readonly type: 'Precheck' | 'Lenient';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface Scheduling extends Enum {
  readonly isAlways: boolean;
  readonly isDynamic: boolean;
  readonly type: 'Always' | 'Dynamic';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface UpgradeGoAhead extends Enum {
  readonly isAbort: boolean;
  readonly isGoAhead: boolean;
  readonly type: 'Abort' | 'GoAhead';
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/runtime/types.ts on lines 271..275
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

export interface Pays extends Enum {
  readonly isYes: boolean;
  readonly isNo: boolean;
  readonly type: 'Yes' | 'No';
}
Severity: Major
Found in packages/types/src/interfaces/runtime/types.ts and 17 other locations - About 30 mins to fix
packages/types/src/interfaces/balances/types.ts on lines 31..35
packages/types/src/interfaces/bridges/types.ts on lines 44..48
packages/types/src/interfaces/nompools/types.ts on lines 7..11
packages/types/src/interfaces/parachains/types.ts on lines 240..244
packages/types/src/interfaces/parachains/types.ts on lines 255..259
packages/types/src/interfaces/parachains/types.ts on lines 641..645
packages/types/src/interfaces/parachains/types.ts on lines 688..692
packages/types/src/interfaces/parachains/types.ts on lines 695..699
packages/types/src/interfaces/parachains/types.ts on lines 749..753
packages/types/src/interfaces/parachains/types.ts on lines 763..767
packages/types/src/interfaces/parachains/types.ts on lines 806..810
packages/types/src/interfaces/parachains/types.ts on lines 896..900
packages/types/src/interfaces/runtime/types.ts on lines 122..126
packages/types/src/interfaces/system/types.ts on lines 444..448
packages/types/src/interfaces/xcm/types.ts on lines 119..123
packages/types/src/interfaces/xcm/types.ts on lines 478..482
packages/types/src/interfaces/xcm/types.ts on lines 636..640

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language