polkadot-js/api

View on GitHub
packages/api-augment/src/polkadot/consts.ts

Summary

Maintainability
F
2 wks
Test Coverage

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

    electionProviderMultiPhase: {
      /**
       * The minimum amount of improvement to the solution score that defines a solution as
       * "better" in the Signed phase.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 1 other location - About 2 days to fix
packages/api-augment/src/kusama/consts.ts on lines 235..309

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

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

    bounties: {
      /**
       * The amount held on deposit for placing a bounty proposal.
       **/
      bountyDepositBase: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/kusama/consts.ts on lines 117..163
packages/api-augment/src/substrate/consts.ts on lines 211..257

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

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

    treasury: {
      /**
       * Percentage of spare funds (if any) that are burnt per spend period.
       **/
      burn: Permill & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 2 other locations - About 1 day to fix
packages/api-augment/src/kusama/consts.ts on lines 999..1039
packages/api-augment/src/substrate/consts.ts on lines 1607..1647

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

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

    identity: {
      /**
       * The amount held on deposit for a registered identity.
       **/
      basicDeposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 3 other locations - About 1 day to fix
packages/api-augment/src/kusama/consts.ts on lines 373..413
packages/api-augment/src/substrate/consts.ts on lines 648..688
packages/api-augment/src/substrate/consts.ts on lines 1660..1698

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

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

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

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

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

Refactorings

Further Reading

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

    proxy: {
      /**
       * The base amount of currency needed to reserve for creating an announcement.
       * 
       * This is held when a new storage item holding a `Balance` is created (typically 16
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 616..658
packages/api-augment/src/kusama/consts.ts on lines 819..889
packages/api-augment/src/kusama/consts.ts on lines 920..953
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/polkadot/consts.ts on lines 664..697
packages/api-augment/src/substrate/consts.ts on lines 1086..1128
packages/api-augment/src/substrate/consts.ts on lines 1355..1425
packages/api-augment/src/substrate/consts.ts on lines 1426..1455
packages/api-augment/src/substrate/consts.ts on lines 1486..1519
packages/api-augment/src/substrate/consts.ts on lines 1545..1576

Duplicated Code

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

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

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

Tuning

This issue has a mass of 167.

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

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

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

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

Refactorings

Further Reading

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

    system: {
      /**
       * Maximum number of block number to block hash mappings to keep (oldest pruned first).
       **/
      blockHashCount: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 616..658
packages/api-augment/src/kusama/consts.ts on lines 819..889
packages/api-augment/src/kusama/consts.ts on lines 920..953
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 593..663
packages/api-augment/src/substrate/consts.ts on lines 1086..1128
packages/api-augment/src/substrate/consts.ts on lines 1355..1425
packages/api-augment/src/substrate/consts.ts on lines 1426..1455
packages/api-augment/src/substrate/consts.ts on lines 1486..1519
packages/api-augment/src/substrate/consts.ts on lines 1545..1576

Duplicated Code

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

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

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

Tuning

This issue has a mass of 167.

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

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

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

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

Refactorings

Further Reading

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

    staking: {
      /**
       * Number of eras that staked funds must remain bonded for.
       **/
      bondingDuration: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 10 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 616..658
packages/api-augment/src/kusama/consts.ts on lines 819..889
packages/api-augment/src/kusama/consts.ts on lines 920..953
packages/api-augment/src/polkadot/consts.ts on lines 474..516
packages/api-augment/src/polkadot/consts.ts on lines 664..697
packages/api-augment/src/substrate/consts.ts on lines 1086..1128
packages/api-augment/src/substrate/consts.ts on lines 1355..1425
packages/api-augment/src/substrate/consts.ts on lines 1426..1455
packages/api-augment/src/substrate/consts.ts on lines 1486..1519
packages/api-augment/src/substrate/consts.ts on lines 1545..1576

Duplicated Code

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

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

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

Tuning

This issue has a mass of 167.

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

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

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

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

Refactorings

Further Reading

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

    referenda: {
      /**
       * Quantization level for the referendum wakeup scheduler. A higher number will result in
       * fewer storage reads/writes needed for smaller voters, but also result in delays to the
       * automatic referendum status changes. Explicit servicing instructions are unaffected.
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 4 other locations - About 6 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 321..349
packages/api-augment/src/kusama/consts.ts on lines 699..727
packages/api-augment/src/substrate/consts.ts on lines 1129..1157
packages/api-augment/src/substrate/consts.ts on lines 1198..1226

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

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

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

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

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

Refactorings

Further Reading

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

    balances: {
      /**
       * The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
       * 
       * If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 9 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 36..63
packages/api-augment/src/kusama/consts.ts on lines 64..93
packages/api-augment/src/kusama/consts.ts on lines 540..569
packages/api-augment/src/kusama/consts.ts on lines 659..698
packages/api-augment/src/polkadot/consts.ts on lines 36..63
packages/api-augment/src/substrate/consts.ts on lines 126..153
packages/api-augment/src/substrate/consts.ts on lines 154..187
packages/api-augment/src/substrate/consts.ts on lines 258..279
packages/api-augment/src/substrate/consts.ts on lines 1158..1197

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

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

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

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

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

Refactorings

Further Reading

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

    babe: {
      /**
       * The amount of time, in slots, that each epoch should last.
       * NOTE: Currently it is not possible to change the epoch duration after
       * the chain has started. Attempting to do so will brick block production.
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 9 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 36..63
packages/api-augment/src/kusama/consts.ts on lines 64..93
packages/api-augment/src/kusama/consts.ts on lines 540..569
packages/api-augment/src/kusama/consts.ts on lines 659..698
packages/api-augment/src/polkadot/consts.ts on lines 64..93
packages/api-augment/src/substrate/consts.ts on lines 126..153
packages/api-augment/src/substrate/consts.ts on lines 154..187
packages/api-augment/src/substrate/consts.ts on lines 258..279
packages/api-augment/src/substrate/consts.ts on lines 1158..1197

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

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

    auctions: {
      /**
       * The number of blocks over which an auction may be retroactively ended.
       **/
      endingPeriod: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 18..35

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

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

    messageQueue: {
      /**
       * The size of the page; this implies the maximum message size which can be sent.
       * 
       * A good value depends on the expected message sizes, their weights, the weight that is
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 424..451

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

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 16 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 15 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 94..116
packages/api-augment/src/kusama/consts.ts on lines 215..234
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 452..476
packages/api-augment/src/kusama/consts.ts on lines 570..598
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 625..647
packages/api-augment/src/substrate/consts.ts on lines 712..731
packages/api-augment/src/substrate/consts.ts on lines 841..865
packages/api-augment/src/substrate/consts.ts on lines 1019..1047
packages/api-augment/src/substrate/consts.ts on lines 1266..1292

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 16 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 15 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 94..116
packages/api-augment/src/kusama/consts.ts on lines 215..234
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 452..476
packages/api-augment/src/kusama/consts.ts on lines 570..598
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 625..647
packages/api-augment/src/substrate/consts.ts on lines 712..731
packages/api-augment/src/substrate/consts.ts on lines 841..865
packages/api-augment/src/substrate/consts.ts on lines 1019..1047
packages/api-augment/src/substrate/consts.ts on lines 1266..1292

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 16 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 15 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 94..116
packages/api-augment/src/kusama/consts.ts on lines 215..234
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 452..476
packages/api-augment/src/kusama/consts.ts on lines 570..598
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 625..647
packages/api-augment/src/substrate/consts.ts on lines 712..731
packages/api-augment/src/substrate/consts.ts on lines 841..865
packages/api-augment/src/substrate/consts.ts on lines 1019..1047
packages/api-augment/src/substrate/consts.ts on lines 1266..1292

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 16 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 15 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 94..116
packages/api-augment/src/kusama/consts.ts on lines 215..234
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 452..476
packages/api-augment/src/kusama/consts.ts on lines 570..598
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 625..647
packages/api-augment/src/substrate/consts.ts on lines 712..731
packages/api-augment/src/substrate/consts.ts on lines 841..865
packages/api-augment/src/substrate/consts.ts on lines 1019..1047
packages/api-augment/src/substrate/consts.ts on lines 1266..1292

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 16 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 15 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 94..116
packages/api-augment/src/kusama/consts.ts on lines 215..234
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 452..476
packages/api-augment/src/kusama/consts.ts on lines 570..598
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 625..647
packages/api-augment/src/substrate/consts.ts on lines 712..731
packages/api-augment/src/substrate/consts.ts on lines 841..865
packages/api-augment/src/substrate/consts.ts on lines 1019..1047
packages/api-augment/src/substrate/consts.ts on lines 1266..1292

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

    scheduler: {
      /**
       * The maximum weight that may be scheduled per block for any dispatchables.
       **/
      maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 13 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 164..177
packages/api-augment/src/kusama/consts.ts on lines 185..204
packages/api-augment/src/kusama/consts.ts on lines 728..742
packages/api-augment/src/kusama/consts.ts on lines 743..760
packages/api-augment/src/kusama/consts.ts on lines 761..774
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 377..396
packages/api-augment/src/substrate/consts.ts on lines 821..840
packages/api-augment/src/substrate/consts.ts on lines 1293..1310

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

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

    registrar: {
      /**
       * The deposit to be paid per byte stored on chain.
       **/
      dataDepositPerByte: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 13 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 164..177
packages/api-augment/src/kusama/consts.ts on lines 185..204
packages/api-augment/src/kusama/consts.ts on lines 728..742
packages/api-augment/src/kusama/consts.ts on lines 743..760
packages/api-augment/src/kusama/consts.ts on lines 761..774
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 377..396
packages/api-augment/src/substrate/consts.ts on lines 821..840
packages/api-augment/src/substrate/consts.ts on lines 1293..1310

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

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

    slots: {
      /**
       * The number of blocks to offset each lease period by.
       **/
      leaseOffset: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 13 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 164..177
packages/api-augment/src/kusama/consts.ts on lines 185..204
packages/api-augment/src/kusama/consts.ts on lines 728..742
packages/api-augment/src/kusama/consts.ts on lines 743..760
packages/api-augment/src/kusama/consts.ts on lines 761..774
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 377..396
packages/api-augment/src/substrate/consts.ts on lines 821..840
packages/api-augment/src/substrate/consts.ts on lines 1293..1310

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

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

    convictionVoting: {
      /**
       * The maximum number of concurrent votes an account may have.
       * 
       * Also used to compute weight, an overly large value can lead to extrinsics with large
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 13 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 164..177
packages/api-augment/src/kusama/consts.ts on lines 185..204
packages/api-augment/src/kusama/consts.ts on lines 728..742
packages/api-augment/src/kusama/consts.ts on lines 743..760
packages/api-augment/src/kusama/consts.ts on lines 761..774
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 377..396
packages/api-augment/src/substrate/consts.ts on lines 821..840
packages/api-augment/src/substrate/consts.ts on lines 1293..1310

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

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

    childBounties: {
      /**
       * Minimum value for a child-bounty.
       **/
      childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 13 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 164..177
packages/api-augment/src/kusama/consts.ts on lines 185..204
packages/api-augment/src/kusama/consts.ts on lines 728..742
packages/api-augment/src/kusama/consts.ts on lines 743..760
packages/api-augment/src/kusama/consts.ts on lines 761..774
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 377..396
packages/api-augment/src/substrate/consts.ts on lines 821..840
packages/api-augment/src/substrate/consts.ts on lines 1293..1310

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

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

    vesting: {
      maxVestingSchedules: u32 & AugmentedConst<ApiType>;
      /**
       * The minimum amount transferred to call `vested_transfer`.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 2 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 1050..1060
packages/api-augment/src/substrate/consts.ts on lines 1709..1719

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

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

    voterList: {
      /**
       * The list of thresholds separating the various bags.
       * 
       * Ids are separated into unsorted bags according to their score. This specifies the
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 2 other locations - About 55 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 1061..1112
packages/api-augment/src/substrate/consts.ts on lines 1720..1771

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

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

    timestamp: {
      /**
       * The minimum period between blocks.
       * 
       * Be aware that this is different to the *expected* period that the block production
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 24 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 397..406
packages/api-augment/src/substrate/consts.ts on lines 407..416
packages/api-augment/src/substrate/consts.ts on lines 614..624
packages/api-augment/src/substrate/consts.ts on lines 689..701
packages/api-augment/src/substrate/consts.ts on lines 702..711
packages/api-augment/src/substrate/consts.ts on lines 1456..1485
packages/api-augment/src/substrate/consts.ts on lines 1520..1529
packages/api-augment/src/substrate/consts.ts on lines 1530..1544
packages/api-augment/src/substrate/consts.ts on lines 1577..1606
packages/api-augment/src/substrate/consts.ts on lines 1648..1659
packages/api-augment/src/substrate/consts.ts on lines 1699..1708

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

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

    utility: {
      /**
       * The limit on the number of batched calls.
       **/
      batchedCallsLimit: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 24 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 397..406
packages/api-augment/src/substrate/consts.ts on lines 407..416
packages/api-augment/src/substrate/consts.ts on lines 614..624
packages/api-augment/src/substrate/consts.ts on lines 689..701
packages/api-augment/src/substrate/consts.ts on lines 702..711
packages/api-augment/src/substrate/consts.ts on lines 1456..1485
packages/api-augment/src/substrate/consts.ts on lines 1520..1529
packages/api-augment/src/substrate/consts.ts on lines 1530..1544
packages/api-augment/src/substrate/consts.ts on lines 1577..1606
packages/api-augment/src/substrate/consts.ts on lines 1648..1659
packages/api-augment/src/substrate/consts.ts on lines 1699..1708

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

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 24 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 397..406
packages/api-augment/src/substrate/consts.ts on lines 407..416
packages/api-augment/src/substrate/consts.ts on lines 614..624
packages/api-augment/src/substrate/consts.ts on lines 689..701
packages/api-augment/src/substrate/consts.ts on lines 702..711
packages/api-augment/src/substrate/consts.ts on lines 1456..1485
packages/api-augment/src/substrate/consts.ts on lines 1520..1529
packages/api-augment/src/substrate/consts.ts on lines 1530..1544
packages/api-augment/src/substrate/consts.ts on lines 1577..1606
packages/api-augment/src/substrate/consts.ts on lines 1648..1659
packages/api-augment/src/substrate/consts.ts on lines 1699..1708

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

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

    transactionPayment: {
      /**
       * A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
       * `priority`
       * 
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 24 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 397..406
packages/api-augment/src/substrate/consts.ts on lines 407..416
packages/api-augment/src/substrate/consts.ts on lines 614..624
packages/api-augment/src/substrate/consts.ts on lines 689..701
packages/api-augment/src/substrate/consts.ts on lines 702..711
packages/api-augment/src/substrate/consts.ts on lines 1456..1485
packages/api-augment/src/substrate/consts.ts on lines 1520..1529
packages/api-augment/src/substrate/consts.ts on lines 1530..1544
packages/api-augment/src/substrate/consts.ts on lines 1577..1606
packages/api-augment/src/substrate/consts.ts on lines 1648..1659
packages/api-augment/src/substrate/consts.ts on lines 1699..1708

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

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

    fastUnstake: {
      /**
       * Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
       * the costs of resources on unsuccessful unstake.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 24 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 397..406
packages/api-augment/src/substrate/consts.ts on lines 407..416
packages/api-augment/src/substrate/consts.ts on lines 614..624
packages/api-augment/src/substrate/consts.ts on lines 689..701
packages/api-augment/src/substrate/consts.ts on lines 702..711
packages/api-augment/src/substrate/consts.ts on lines 1456..1485
packages/api-augment/src/substrate/consts.ts on lines 1520..1529
packages/api-augment/src/substrate/consts.ts on lines 1530..1544
packages/api-augment/src/substrate/consts.ts on lines 1577..1606
packages/api-augment/src/substrate/consts.ts on lines 1648..1659
packages/api-augment/src/substrate/consts.ts on lines 1699..1708

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

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

    paras: {
      unsignedPriority: u64 & AugmentedConst<ApiType>;
      /**
       * Generic const
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 3 other locations - About 30 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 178..184
packages/api-augment/src/kusama/consts.ts on lines 609..615
packages/api-augment/src/polkadot/consts.ts on lines 178..184

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

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

    claims: {
      prefix: Bytes & AugmentedConst<ApiType>;
      /**
       * Generic const
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 3 other locations - About 30 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 178..184
packages/api-augment/src/kusama/consts.ts on lines 609..615
packages/api-augment/src/polkadot/consts.ts on lines 467..473

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

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

There are no issues that match your filters.

Category
Status