polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    readonly type: 'NoPermission' | 'UnknownCollection' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved' | 'Unaccepted' | 'Locked' | 'MaxSupplyReached' | 'MaxSupplyAlreadySet' | 'MaxSupplyTooSmall' | 'UnknownItem' | 'NotForSale' | 'BidTooLow';
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 528..528
packages/types-augment/src/lookup/types-substrate.ts on lines 6218..6218

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

    readonly type: 'Created' | 'Bonded' | 'PaidOut' | 'Unbonded' | 'Withdrawn' | 'Destroyed' | 'StateChanged' | 'MemberRemoved' | 'RolesUpdated' | 'PoolSlashed' | 'UnbondingPoolSlashed' | 'PoolCommissionUpdated' | 'PoolMaxCommissionUpdated' | 'PoolCommissionChangeRateUpdated' | 'PoolCommissionClaimPermissionUpdated' | 'PoolCommissionClaimed' | 'MinBalanceDeficitAdjusted' | 'MinBalanceExcessAdjusted';
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 528..528
packages/types-augment/src/lookup/types-substrate.ts on lines 8220..8220

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

    readonly type: 'EraPaid' | 'Rewarded' | 'Slashed' | 'SlashReported' | 'OldSlashingReportDiscarded' | 'StakersElected' | 'Bonded' | 'Unbonded' | 'Withdrawn' | 'Kicked' | 'StakingElectionFailed' | 'Chilled' | 'PayoutStarted' | 'ValidatorPrefsSet' | 'SnapshotVotersSizeExceeded' | 'SnapshotTargetsSizeExceeded' | 'ForceEra' | 'ControllerBatchDeprecated';
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 6218..6218
packages/types-augment/src/lookup/types-substrate.ts on lines 8220..8220

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

  interface PalletStateTrieMigrationProgress extends Enum {
    readonly isToStart: boolean;
    readonly isLastKey: boolean;
    readonly asLastKey: Bytes;
    readonly isComplete: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStakingPalletConfigOpPercent extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: Percent;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNominationPoolsConfigOpU128 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: u128;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStakingPalletConfigOpU32 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: u32;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletAssetConversionOpsCall extends Enum {
    readonly isMigrateToNewAccount: boolean;
    readonly asMigrateToNewAccount: {
      readonly asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId;
      readonly asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface FrameSupportDispatchRawOrigin extends Enum {
    readonly isRoot: boolean;
    readonly isSigned: boolean;
    readonly asSigned: AccountId32;
    readonly isNone: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNominationPoolsConfigOpPerbill extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: Perbill;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStakingPalletConfigOpU128 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: u128;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNominationPoolsConfigOpU32 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: u32;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStakingPalletConfigOpPerbill extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: Perbill;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNominationPoolsConfigOpAccountId32 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: AccountId32;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletMixnetCall extends Enum {
    readonly isRegister: boolean;
    readonly asRegister: {
      readonly registration: PalletMixnetRegistration;
      readonly signature: SpMixnetAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletStatementEvent extends Enum {
    readonly isNewStatement: boolean;
    readonly asNewStatement: {
      readonly account: AccountId32;
      readonly statement: SpStatementStoreStatement;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletImOnlineCall extends Enum {
    readonly isHeartbeat: boolean;
    readonly asHeartbeat: {
      readonly heartbeat: PalletImOnlineHeartbeat;
      readonly signature: PalletImOnlineSr25519AppSr25519Signature;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum {
    readonly isReportDisputeLostUnsigned: boolean;
    readonly asReportDisputeLostUnsigned: {
      readonly disputeProof: PolkadotPrimitivesV6SlashingDisputeProof;
      readonly keyOwnerProof: SpSessionMembershipProof;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletRemarkEvent extends Enum {
    readonly isStored: boolean;
    readonly asStored: {
      readonly sender: AccountId32;
      readonly contentHash: H256;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

  interface PalletOffencesEvent extends Enum {
    readonly isOffence: boolean;
    readonly asOffence: {
      readonly kind: U8aFixed;
      readonly timeslot: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language