polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

    grandpa: {
      /**
       * Max Authorities in use
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    onDemandAssignmentProvider: {
      /**
       * The maximum number of blocks some historical revenue
       * information stored for.
       **/
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    multisig: {
      /**
       * The base amount of currency needed to reserve for creating a multisig execution or to
       * store a dispatch call for later.
       * 
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    grandpa: {
      /**
       * Max Authorities in use
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    multisig: {
      /**
       * The base amount of currency needed to reserve for creating a multisig execution or to
       * store a dispatch call for later.
       * 
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    nominationPools: {
      /**
       * The maximum pool points-to-balance ratio that an `open` pool can have.
       * 
       * This is important in the event slashing takes place and the pool's points-to-balance
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    lottery: {
      /**
       * The max number of calls available in a single lottery.
       **/
      maxCalls: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    crowdloan: {
      /**
       * The minimum amount that may be contributed into a crowdloan. Should almost certainly be
       * at least `ExistentialDeposit`.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    nominationPools: {
      /**
       * The maximum pool points-to-balance ratio that an `open` pool can have.
       * 
       * This is important in the event slashing takes place and the pool's points-to-balance
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    grandpa: {
      /**
       * Max Authorities in use
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

    beefy: {
      /**
       * The maximum number of authorities that can be added.
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..1303

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

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

      freezes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
    readonly id: StagingKusamaRuntimeRuntimeFreezeReason;
    readonly amount: u128;
  } & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 2 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/query.ts on lines 237..240
packages/api-augment/src/kusama/query.ts on lines 969..972

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

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

      holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
    readonly id: StagingKusamaRuntimeRuntimeHoldReason;
    readonly amount: u128;
  } & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 2 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/query.ts on lines 230..233
packages/api-augment/src/kusama/query.ts on lines 969..972

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

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

export interface StorageHasherV11 extends Enum {
  readonly isBlake2128: boolean;
  readonly isBlake2256: boolean;
  readonly isBlake2128Concat: boolean;
  readonly isTwox128: boolean;
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 2 other locations - About 3 hrs to fix
packages/types/src/interfaces/democracy/types.ts on lines 31..40
packages/types/src/interfaces/parachains/types.ts on lines 623..632

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

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

  interface PolkadotPrimitivesV6CandidateDescriptor extends Struct {
    readonly paraId: u32;
    readonly relayParent: H256;
    readonly collator: PolkadotPrimitivesV6CollatorAppPublic;
    readonly persistedValidationDataHash: H256;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 2 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 248..258
packages/types-augment/src/lookup/types-substrate.ts on lines 8569..8579

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

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

      holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
    readonly id: StagingKusamaRuntimeRuntimeHoldReason;
    readonly amount: u128;
  } & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
Severity: Major
Found in packages/api-augment/src/kusama/query.ts and 2 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/query.ts on lines 230..233
packages/api-augment/src/kusama/query.ts on lines 237..240

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

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

  interface PalletReferendaTrackInfo extends Struct {
    readonly name: Text;
    readonly maxDeciding: u32;
    readonly decisionDeposit: u128;
    readonly preparePeriod: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 248..258
packages/types-augment/src/lookup/types-polkadot.ts on lines 857..867

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

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

export interface Conviction extends Enum {
  readonly isNone: boolean;
  readonly isLocked1x: boolean;
  readonly isLocked2x: boolean;
  readonly isLocked3x: boolean;
Severity: Major
Found in packages/types/src/interfaces/democracy/types.ts and 2 other locations - About 3 hrs to fix
packages/types/src/interfaces/metadata/types.ts on lines 640..649
packages/types/src/interfaces/parachains/types.ts on lines 623..632

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

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

  interface PolkadotPrimitivesV7CandidateDescriptor extends Struct {
    readonly paraId: u32;
    readonly relayParent: H256;
    readonly collator: PolkadotPrimitivesV7CollatorAppPublic;
    readonly persistedValidationDataHash: H256;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 2 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 857..867
packages/types-augment/src/lookup/types-substrate.ts on lines 8569..8579

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

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

export interface ParaLifecycle extends Enum {
  readonly isOnboarding: boolean;
  readonly isParathread: boolean;
  readonly isParachain: boolean;
  readonly isUpgradingToParachain: boolean;
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 2 other locations - About 3 hrs to fix
packages/types/src/interfaces/democracy/types.ts on lines 31..40
packages/types/src/interfaces/metadata/types.ts on lines 640..649

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

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