polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    allianceMotion: {
      /**
       * The maximum weight of a dispatch call that can be proposed and executed.
       **/
      maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/kusama/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    council: {
      /**
       * The maximum weight of a dispatch call that can be proposed and executed.
       **/
      maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657

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 22 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 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/kusama/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    stateTrieMigration: {
      /**
       * Maximal number of bytes that a key can have.
       * 
       * FRAME itself does not limit the key length.
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    stateTrieMigration: {
      /**
       * Maximal number of bytes that a key can have.
       * 
       * FRAME itself does not limit the key length.
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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/kusama/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    txPause: {
      /**
       * Maximum length for pallet name and call name SCALE encoded string names.
       * 
       * TOO LONG NAMES WILL BE TREATED AS PAUSED.
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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 22 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 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    imOnline: {
      /**
       * A configuration for base priority of unsigned transactions.
       * 
       * This is exposed so that it can be tuned for particular runtime, when
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1531..1540
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

    technicalCommittee: {
      /**
       * The maximum weight of a dispatch call that can be proposed and executed.
       **/
      maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 21 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 373..382
packages/api-augment/src/kusama/consts.ts on lines 905..919
packages/api-augment/src/kusama/consts.ts on lines 920..949
packages/api-augment/src/kusama/consts.ts on lines 978..987
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 664..693
packages/api-augment/src/polkadot/consts.ts on lines 728..742
packages/api-augment/src/polkadot/consts.ts on lines 743..772
packages/api-augment/src/polkadot/consts.ts on lines 814..823
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 418..427
packages/api-augment/src/substrate/consts.ts on lines 625..635
packages/api-augment/src/substrate/consts.ts on lines 700..712
packages/api-augment/src/substrate/consts.ts on lines 713..722
packages/api-augment/src/substrate/consts.ts on lines 1467..1496
packages/api-augment/src/substrate/consts.ts on lines 1541..1555
packages/api-augment/src/substrate/consts.ts on lines 1588..1617
packages/api-augment/src/substrate/consts.ts on lines 1646..1657
packages/api-augment/src/substrate/consts.ts on lines 1697..1706

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

export interface ForkTreePendingChange extends Struct {
  readonly roots: Vec<ForkTreePendingChangeNode>;
  readonly bestFinalizedNumber: Option<BlockNumber>;
}
Severity: Major
Found in packages/types/src/interfaces/grandpa/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/parachains/types.ts on lines 635..638
packages/types/src/interfaces/staking/types.ts on lines 124..127
packages/types/src/interfaces/staking/types.ts on lines 309..312
packages/types/src/interfaces/staking/types.ts on lines 377..380
packages/types/src/interfaces/staking/types.ts on lines 392..395

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

Severity
Category
Status
Source
Language