polkadot-js/api

View on GitHub

Showing 2,328 of 2,508 total issues

Similar blocks of code found in 24 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 23 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 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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/kusama/consts.ts and 23 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 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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 24 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 23 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 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/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 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

  interface PolkadotPrimitivesV6BackedCandidate extends Struct {
    readonly candidate: PolkadotPrimitivesV6CommittedCandidateReceipt;
    readonly validityVotes: Vec<PolkadotPrimitivesV6ValidityAttestation>;
    readonly validatorIndices: BitVec;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 5 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1890..1894
packages/types-augment/src/lookup/types-polkadot.ts on lines 2185..2189
packages/types-augment/src/lookup/types-substrate.ts on lines 2612..2616
packages/types-augment/src/lookup/types-substrate.ts on lines 4709..4713
packages/types-augment/src/lookup/types-substrate.ts on lines 5697..5701

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

  interface PalletMigrationsActiveCursor extends Struct {
    readonly index: u32;
    readonly innerCursor: Option<Bytes>;
    readonly startedAt: u32;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 5 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 827..831
packages/types-augment/src/lookup/types-polkadot.ts on lines 1890..1894
packages/types-augment/src/lookup/types-polkadot.ts on lines 2185..2189
packages/types-augment/src/lookup/types-substrate.ts on lines 2612..2616
packages/types-augment/src/lookup/types-substrate.ts on lines 4709..4713

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 ElectionSize extends Struct {
  readonly validators: Compact<ValidatorIndex>;
  readonly nominators: Compact<NominatorIndex>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/parachains/types.ts on lines 635..638
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

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

export interface SolutionOrSnapshotSize extends Struct {
  readonly voters: Compact<u32>;
  readonly targets: Compact<u32>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
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 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