polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

  it('has the correct messages', (): void => {
    expect(
      latest.spec.messages.map(({ label }) => label.toString())
    ).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
  });
Severity: Major
Found in packages/api-contract/src/Abi/toLatestCompatible.spec.ts and 1 other location - About 1 hr to fix
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 166..170

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

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

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

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

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

Refactorings

Further Reading

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

  it('has the correct messages', (): void => {
    expect(
      latest.spec.messages.map(({ label }) => label.toString())
    ).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
  });
Severity: Major
Found in packages/api-contract/src/Abi/toLatestCompatible.spec.ts and 1 other location - About 1 hr to fix
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 22..26

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

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

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

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

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

Refactorings

Further Reading

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

  interface FinalityGrandpaEquivocationPrevote extends Struct {
    readonly roundNumber: u64;
    readonly identity: SpConsensusGrandpaAppPublic;
    readonly first: ITuple<[FinalityGrandpaPrevote, SpConsensusGrandpaAppSignature]>;
    readonly second: ITuple<[FinalityGrandpaPrevote, SpConsensusGrandpaAppSignature]>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3247..3252

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

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

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

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

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

Refactorings

Further Reading

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

  interface FinalityGrandpaEquivocationPrecommit extends Struct {
    readonly roundNumber: u64;
    readonly identity: SpConsensusGrandpaAppPublic;
    readonly first: ITuple<[FinalityGrandpaPrecommit, SpConsensusGrandpaAppSignature]>;
    readonly second: ITuple<[FinalityGrandpaPrecommit, SpConsensusGrandpaAppSignature]>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3230..3235

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

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

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

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

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

Refactorings

Further Reading

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

    slots: {
      /**
       * The number of blocks to offset each lease period by.
       **/
      leaseOffset: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    coreFellowship: {
      /**
       * The maximum size in bytes submitted evidence is allowed to be.
       **/
      evidenceSize: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    registrar: {
      /**
       * The deposit to be paid per byte stored on chain.
       **/
      dataDepositPerByte: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    coretime: {
      /**
       * The ParaId of the coretime chain.
       **/
      brokerId: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    slots: {
      /**
       * The number of blocks to offset each lease period by.
       **/
      leaseOffset: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    scheduler: {
      /**
       * The maximum weight that may be scheduled per block for any dispatchables.
       **/
      maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    childBounties: {
      /**
       * Minimum value for a child-bounty.
       **/
      childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    childBounties: {
      /**
       * Minimum value for a child-bounty.
       **/
      childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    scheduler: {
      /**
       * The maximum weight that may be scheduled per block for any dispatchables.
       **/
      maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    childBounties: {
      /**
       * Minimum value for a child-bounty.
       **/
      childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    convictionVoting: {
      /**
       * The maximum number of concurrent votes an account may have.
       * 
       * Also used to compute weight, an overly large value can lead to extrinsics with large
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    convictionVoting: {
      /**
       * The maximum number of concurrent votes an account may have.
       * 
       * Also used to compute weight, an overly large value can lead to extrinsics with large
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    multiBlockMigrations: {
      /**
       * The maximal length of an encoded cursor.
       * 
       * A good default needs to selected such that no migration will ever have a cursor with MEL
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    convictionVoting: {
      /**
       * The maximum number of concurrent votes an account may have.
       * 
       * Also used to compute weight, an overly large value can lead to extrinsics with large
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    scheduler: {
      /**
       * The maximum weight that may be scheduled per block for any dispatchables.
       **/
      maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 709..723
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    registrar: {
      /**
       * The deposit to be paid per byte stored on chain.
       **/
      dataDepositPerByte: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 15 other locations - About 1 hr to fix
packages/api-augment/src/kusama/consts.ts on lines 168..181
packages/api-augment/src/kusama/consts.ts on lines 189..208
packages/api-augment/src/kusama/consts.ts on lines 209..222
packages/api-augment/src/kusama/consts.ts on lines 724..741
packages/api-augment/src/kusama/consts.ts on lines 742..755
packages/api-augment/src/polkadot/consts.ts on lines 164..177
packages/api-augment/src/polkadot/consts.ts on lines 185..204
packages/api-augment/src/polkadot/consts.ts on lines 546..560
packages/api-augment/src/polkadot/consts.ts on lines 561..578
packages/api-augment/src/polkadot/consts.ts on lines 579..592
packages/api-augment/src/substrate/consts.ts on lines 280..293
packages/api-augment/src/substrate/consts.ts on lines 382..401
packages/api-augment/src/substrate/consts.ts on lines 402..417
packages/api-augment/src/substrate/consts.ts on lines 832..851
packages/api-augment/src/substrate/consts.ts on lines 1304..1321

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language