polkadot-js/api

View on GitHub

Showing 2,246 of 2,426 total issues

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

  PalletIdentityJudgement: {
    _enum: {
      Unknown: 'Null',
      FeePaid: 'u128',
      Reasonable: 'Null',
Severity: Minor
Found in packages/types-augment/src/lookup/substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/polkadot.ts on lines 1609..1619

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

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

  try {
    while (i < count) {
      const value = new Types[i](registry, u8a.subarray(offset));

      offset += value.initialU8aLength || value.encodedLength;
Severity: Minor
Found in packages/types-codec/src/utils/decodeU8a.ts and 1 other location - About 40 mins to fix
packages/types-codec/src/utils/decodeU8a.ts on lines 40..50

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

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 SpNposElectionsSupport extends Struct {
    readonly total: u128;
    readonly voters: Vec<ITuple<[AccountId32, u128]>>;
  }
Severity: Minor
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7587..7590

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

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

      registry.register({
        Balance: 'u32',
        TestComplex: {
          balance: 'Balance',
          // eslint-disable-next-line sort-keys
Severity: Minor
Found in packages/types/src/create/createType.spec.ts and 1 other location - About 40 mins to fix
packages/types/src/create/createType.spec.ts on lines 214..224

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    configuration: {
      /**
       * The new value for a configuration parameter is invalid.
       **/
      InvalidNewValue: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    configuration: {
      /**
       * The new value for a configuration parameter is invalid.
       **/
      InvalidNewValue: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    multiBlockMigrations: {
      /**
       * The operation cannot complete since some MBMs are ongoing.
       **/
      Ongoing: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    sudo: {
      /**
       * Sender must be the Sudo account.
       **/
      RequireSudo: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    tasksExample: {
      /**
       * The referenced task was not found.
       **/
      NotFound: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    coretime: {
      /**
       * The paraid making the call is not the coretime brokerage system parachain.
       **/
      NotBroker: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3315..3324
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 11 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 260..269
packages/api-augment/src/kusama/errors.ts on lines 325..334
packages/api-augment/src/kusama/errors.ts on lines 2189..2198
packages/api-augment/src/kusama/errors.ts on lines 2226..2235
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1568..1577
packages/api-augment/src/substrate/errors.ts on lines 2941..2950
packages/api-augment/src/substrate/errors.ts on lines 2997..3006
packages/api-augment/src/substrate/errors.ts on lines 3352..3361

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

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

    readonly asRetryCancelled: {
      readonly task: ITuple<[u32, u32]>;
      readonly id: Option<U8aFixed>;
    } & Struct;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1262..1265
packages/types-augment/src/lookup/types-substrate.ts on lines 1267..1270
packages/types-augment/src/lookup/types-substrate.ts on lines 1272..1275
packages/types-augment/src/lookup/types-substrate.ts on lines 1277..1280

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

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

    readonly asCallUnavailable: {
      readonly task: ITuple<[u32, u32]>;
      readonly id: Option<U8aFixed>;
    } & Struct;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1257..1260
packages/types-augment/src/lookup/types-substrate.ts on lines 1267..1270
packages/types-augment/src/lookup/types-substrate.ts on lines 1272..1275
packages/types-augment/src/lookup/types-substrate.ts on lines 1277..1280

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

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

    readonly asPermanentlyOverweight: {
      readonly task: ITuple<[u32, u32]>;
      readonly id: Option<U8aFixed>;
    } & Struct;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1257..1260
packages/types-augment/src/lookup/types-substrate.ts on lines 1262..1265
packages/types-augment/src/lookup/types-substrate.ts on lines 1267..1270
packages/types-augment/src/lookup/types-substrate.ts on lines 1272..1275

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

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

    readonly asPeriodicFailed: {
      readonly task: ITuple<[u32, u32]>;
      readonly id: Option<U8aFixed>;
    } & Struct;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1257..1260
packages/types-augment/src/lookup/types-substrate.ts on lines 1262..1265
packages/types-augment/src/lookup/types-substrate.ts on lines 1272..1275
packages/types-augment/src/lookup/types-substrate.ts on lines 1277..1280

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

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