polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

    session: {
      /**
       * See [`Pallet::purge_keys`].
       **/
      purgeKeys: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 2 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 3008..3040
packages/api-augment/src/substrate/tx.ts on lines 5597..5629

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

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

    session: {
      /**
       * Removes any session key(s) of the function caller.
       * 
       * This doesn't take effect until the next session.
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 2 other locations - About 6 hrs to fix
packages/api-augment/src/polkadot/tx.ts on lines 1146..1159
packages/api-augment/src/substrate/tx.ts on lines 5597..5629

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV7ExecutorParamsExecutorParam extends Enum {
    readonly isMaxMemoryPages: boolean;
    readonly asMaxMemoryPages: u32;
    readonly isStackLogicalMax: boolean;
    readonly asStackLogicalMax: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 1 other location - About 6 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 771..786

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV6ExecutorParamsExecutorParam extends Enum {
    readonly isMaxMemoryPages: boolean;
    readonly asMaxMemoryPages: u32;
    readonly isStackLogicalMax: boolean;
    readonly asStackLogicalMax: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 1 other location - About 6 hrs to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 165..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 168.

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

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

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

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

Refactorings

Further Reading

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

    staking: {
      /**
       * Number of eras that staked funds must remain bonded for.
       **/
      bondingDuration: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    proxy: {
      /**
       * The base amount of currency needed to reserve for creating an announcement.
       * 
       * This is held when a new storage item holding a `Balance` is created (typically 16
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    staking: {
      /**
       * Number of eras that staked funds must remain bonded for.
       **/
      bondingDuration: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    proxy: {
      /**
       * The base amount of currency needed to reserve for creating an announcement.
       * 
       * This is held when a new storage item holding a `Balance` is created (typically 16
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    proxy: {
      /**
       * The base amount of currency needed to reserve for creating an announcement.
       * 
       * This is held when a new storage item holding a `Balance` is created (typically 16
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    system: {
      /**
       * Maximum number of block number to block hash mappings to keep (oldest pruned first).
       **/
      blockHashCount: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    system: {
      /**
       * Maximum number of block number to block hash mappings to keep (oldest pruned first).
       **/
      blockHashCount: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    statement: {
      /**
       * Cost of data byte used for priority calculation.
       **/
      byteCost: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    staking: {
      /**
       * Number of eras that staked funds must remain bonded for.
       **/
      bondingDuration: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

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

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

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

Refactorings

Further Reading

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

    tips: {
      /**
       * The amount held on deposit per byte within the tip report reason or bounty description.
       **/
      dataDepositPerByte: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1497..1530

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

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

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

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

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

Refactorings

Further Reading

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

    system: {
      /**
       * Maximum number of block number to block hash mappings to keep (oldest pruned first).
       **/
      blockHashCount: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 597..639
packages/api-augment/src/kusama/consts.ts on lines 800..870
packages/api-augment/src/kusama/consts.ts on lines 871..904
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 694..727
packages/api-augment/src/substrate/consts.ts on lines 1097..1139
packages/api-augment/src/substrate/consts.ts on lines 1366..1436
packages/api-augment/src/substrate/consts.ts on lines 1437..1466
packages/api-augment/src/substrate/consts.ts on lines 1556..1587

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

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

    auctions: {
      /**
       * The para is already leased out for part of this range.
       **/
      AlreadyLeasedOut: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 8 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 685..720
packages/api-augment/src/polkadot/errors.ts on lines 28..61
packages/api-augment/src/polkadot/errors.ts on lines 522..557
packages/api-augment/src/substrate/errors.ts on lines 477..510
packages/api-augment/src/substrate/errors.ts on lines 1320..1355
packages/api-augment/src/substrate/errors.ts on lines 1506..1539
packages/api-augment/src/substrate/errors.ts on lines 2524..2557
packages/api-augment/src/substrate/errors.ts on lines 3107..3140

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

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

    beefy: {
      /**
       * A given equivocation report is valid but already previously reported.
       **/
      DuplicateOffenceReport: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 8 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 32..65
packages/api-augment/src/kusama/errors.ts on lines 685..720
packages/api-augment/src/polkadot/errors.ts on lines 28..61
packages/api-augment/src/polkadot/errors.ts on lines 522..557
packages/api-augment/src/substrate/errors.ts on lines 1320..1355
packages/api-augment/src/substrate/errors.ts on lines 1506..1539
packages/api-augment/src/substrate/errors.ts on lines 2524..2557
packages/api-augment/src/substrate/errors.ts on lines 3107..3140

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

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

    lottery: {
      /**
       * A lottery has already ended.
       **/
      AlreadyEnded: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 8 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 32..65
packages/api-augment/src/kusama/errors.ts on lines 685..720
packages/api-augment/src/polkadot/errors.ts on lines 28..61
packages/api-augment/src/polkadot/errors.ts on lines 522..557
packages/api-augment/src/substrate/errors.ts on lines 477..510
packages/api-augment/src/substrate/errors.ts on lines 1320..1355
packages/api-augment/src/substrate/errors.ts on lines 2524..2557
packages/api-augment/src/substrate/errors.ts on lines 3107..3140

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

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

    auctions: {
      /**
       * The para is already leased out for part of this range.
       **/
      AlreadyLeasedOut: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 8 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 32..65
packages/api-augment/src/kusama/errors.ts on lines 685..720
packages/api-augment/src/polkadot/errors.ts on lines 522..557
packages/api-augment/src/substrate/errors.ts on lines 477..510
packages/api-augment/src/substrate/errors.ts on lines 1320..1355
packages/api-augment/src/substrate/errors.ts on lines 1506..1539
packages/api-augment/src/substrate/errors.ts on lines 2524..2557
packages/api-augment/src/substrate/errors.ts on lines 3107..3140

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

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

    grandpa: {
      /**
       * Attempt to signal GRANDPA change with one already pending.
       **/
      ChangePending: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 8 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 32..65
packages/api-augment/src/polkadot/errors.ts on lines 28..61
packages/api-augment/src/polkadot/errors.ts on lines 522..557
packages/api-augment/src/substrate/errors.ts on lines 477..510
packages/api-augment/src/substrate/errors.ts on lines 1320..1355
packages/api-augment/src/substrate/errors.ts on lines 1506..1539
packages/api-augment/src/substrate/errors.ts on lines 2524..2557
packages/api-augment/src/substrate/errors.ts on lines 3107..3140

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

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