polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    convictionVoting: {
      /**
       * The voting classes which have a non-zero lock requirement and the lock amounts which they
       * require. The actual amount locked on behalf of this pallet should always be the maximum of
       * this list.
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/polkadot/query.ts on lines 408..424
packages/api-augment/src/substrate/query.ts on lines 563..579

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

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

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

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

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

Refactorings

Further Reading

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

    convictionVoting: {
      /**
       * The voting classes which have a non-zero lock requirement and the lock amounts which they
       * require. The actual amount locked on behalf of this pallet should always be the maximum of
       * this list.
Severity: Major
Found in packages/api-augment/src/substrate/query.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/kusama/query.ts on lines 417..433
packages/api-augment/src/polkadot/query.ts on lines 408..424

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

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

    messageQueue: {
      /**
       * The message was already processed and cannot be processed again.
       **/
      AlreadyProcessed: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

    preimage: {
      /**
       * Preimage has already been noted on-chain.
       **/
      AlreadyNoted: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

    parasDisputes: {
      /**
       * Ancient dispute statement provided.
       **/
      AncientDisputeStatement: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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: {
      /**
       * The origin filter prevent the call to be dispatched.
       **/
      CallFiltered: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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: {
      /**
       * The origin filter prevent the call to be dispatched.
       **/
      CallFiltered: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227

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

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

    messageQueue: {
      /**
       * The message was already processed and cannot be processed again.
       **/
      AlreadyProcessed: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

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

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

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

Refactorings

Further Reading

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

    mmr: {
      /**
       * Hashes of the nodes in the MMR.
       * 
       * Note this collection only contains MMR peaks, the inner nodes (and leaves)
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/polkadot/query.ts on lines 839..859
packages/api-augment/src/substrate/query.ts on lines 1129..1149

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

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

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

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

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

Refactorings

Further Reading

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

    mmr: {
      /**
       * Hashes of the nodes in the MMR.
       * 
       * Note this collection only contains MMR peaks, the inner nodes (and leaves)
Severity: Major
Found in packages/api-augment/src/polkadot/query.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/kusama/query.ts on lines 877..897
packages/api-augment/src/substrate/query.ts on lines 1129..1149

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

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

    paraInherent: {
      /**
       * A candidate was backed by a disabled validator
       **/
      BackedByDisabled: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

    parasDisputes: {
      /**
       * Ancient dispute statement provided.
       **/
      AncientDisputeStatement: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

    messageQueue: {
      /**
       * The message was already processed and cannot be processed again.
       **/
      AlreadyProcessed: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

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

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

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

Refactorings

Further Reading

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

    mmr: {
      /**
       * Hashes of the nodes in the MMR.
       * 
       * Note this collection only contains MMR peaks, the inner nodes (and leaves)
Severity: Major
Found in packages/api-augment/src/substrate/query.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/kusama/query.ts on lines 877..897
packages/api-augment/src/polkadot/query.ts on lines 839..859

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

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

    preimage: {
      /**
       * Preimage has already been noted on-chain.
       **/
      AlreadyNoted: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 935..978
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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

    coreFellowship: {
      /**
       * The candidate has already been inducted. This should never happen since it would
       * require a candidate (rank 0) to already be tracked in the pallet.
       **/
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 1 day to fix
packages/api-augment/src/kusama/errors.ts on lines 833..880
packages/api-augment/src/kusama/errors.ts on lines 1404..1445
packages/api-augment/src/kusama/errors.ts on lines 1477..1518
packages/api-augment/src/kusama/errors.ts on lines 2087..2132
packages/api-augment/src/polkadot/errors.ts on lines 780..827
packages/api-augment/src/polkadot/errors.ts on lines 1159..1201
packages/api-augment/src/polkadot/errors.ts on lines 1256..1297
packages/api-augment/src/substrate/errors.ts on lines 1540..1587
packages/api-augment/src/substrate/errors.ts on lines 2186..2227
packages/api-augment/src/substrate/errors.ts on lines 2983..3028

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

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 StagingXcmV4JunctionNetworkId extends Enum {
    readonly isByGenesis: boolean;
    readonly asByGenesis: U8aFixed;
    readonly isByFork: boolean;
    readonly asByFork: {
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 1 other location - About 1 day to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 120..141

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

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 XcmV3JunctionNetworkId extends Enum {
    readonly isByGenesis: boolean;
    readonly asByGenesis: U8aFixed;
    readonly isByFork: boolean;
    readonly asByFork: {
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 1 other location - About 1 day to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 262..283

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

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

    parasSlashing: {
      /**
       * Validators pending dispute slashes.
       **/
      unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 1 other location - About 1 day to fix
packages/api-augment/src/polkadot/query.ts on lines 1300..1313

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

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

    parasSlashing: {
      /**
       * Validators pending dispute slashes.
       **/
      unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV6SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
Severity: Major
Found in packages/api-augment/src/polkadot/query.ts and 1 other location - About 1 day to fix
packages/api-augment/src/kusama/query.ts on lines 1473..1486

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

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