polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

      cancelApproval: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | Uint8Array | MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 1 other location - About 5 hrs to fix
packages/api-augment/src/substrate/tx.ts on lines 6991..6991

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

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

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

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

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

Refactorings

Further Reading

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

    grandpa: {
      /**
       * New authority set has been applied.
       **/
      NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
Severity: Major
Found in packages/api-augment/src/kusama/events.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/polkadot/events.ts on lines 372..389
packages/api-augment/src/substrate/events.ts on lines 957..974

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

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

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

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

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

Refactorings

Further Reading

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

    grandpa: {
      /**
       * New authority set has been applied.
       **/
      NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
Severity: Major
Found in packages/api-augment/src/polkadot/events.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/events.ts on lines 477..494
packages/api-augment/src/substrate/events.ts on lines 957..974

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

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

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

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

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

Refactorings

Further Reading

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

    grandpa: {
      /**
       * New authority set has been applied.
       **/
      NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
Severity: Major
Found in packages/api-augment/src/substrate/events.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/events.ts on lines 477..494
packages/api-augment/src/polkadot/events.ts on lines 372..389

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

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

    claims: {
      /**
       * Invalid Ethereum signature.
       **/
      InvalidEthereumSignature: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    fastUnstake: {
      /**
       * The provided un-staker is already in Head, and cannot deregister.
       **/
      AlreadyHead: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    fastUnstake: {
      /**
       * The provided un-staker is already in Head, and cannot deregister.
       **/
      AlreadyHead: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    parasSlashing: {
      /**
       * The given slashing report is valid but already previously reported.
       **/
      DuplicateSlashingReport: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    claims: {
      /**
       * Invalid Ethereum signature.
       **/
      InvalidEthereumSignature: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

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

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

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

Refactorings

Further Reading

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

    treasury: {
      /**
       * Percentage of spare funds (if any) that are burnt per spend period.
       **/
      burn: Permill & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 3 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 950..977
packages/api-augment/src/substrate/consts.ts on lines 18..43
packages/api-augment/src/substrate/consts.ts on lines 877..903

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

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

    stateTrieMigration: {
      /**
       * Bad child root provided.
       **/
      BadChildRoot: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303

Duplicated Code

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

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

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

Tuning

This issue has a mass of 143.

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

    stateTrieMigration: {
      /**
       * Bad child root provided.
       **/
      BadChildRoot: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    fastUnstake: {
      /**
       * The provided un-staker is already in Head, and cannot deregister.
       **/
      AlreadyHead: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/kusama/errors.ts on lines 1446..1476
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

    parasSlashing: {
      /**
       * The given slashing report is valid but already previously reported.
       **/
      DuplicateSlashingReport: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 8 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 233..263
packages/api-augment/src/kusama/errors.ts on lines 541..572
packages/api-augment/src/polkadot/errors.ts on lines 229..259
packages/api-augment/src/polkadot/errors.ts on lines 490..521
packages/api-augment/src/polkadot/errors.ts on lines 1298..1328
packages/api-augment/src/polkadot/errors.ts on lines 1715..1750
packages/api-augment/src/substrate/errors.ts on lines 1272..1303
packages/api-augment/src/substrate/errors.ts on lines 2937..2972

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

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

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

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

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

Refactorings

Further Reading

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

    treasury: {
      /**
       * Percentage of spare funds (if any) that are burnt per spend period.
       **/
      burn: Permill & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 3 other locations - About 5 hrs to fix
packages/api-augment/src/substrate/consts.ts on lines 18..43
packages/api-augment/src/substrate/consts.ts on lines 877..903
packages/api-augment/src/substrate/consts.ts on lines 1618..1645

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

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

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

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

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

Refactorings

Further Reading

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

    alliance: {
      /**
       * The deposit required for submitting candidacy.
       **/
      allyDeposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 3 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 950..977
packages/api-augment/src/substrate/consts.ts on lines 877..903
packages/api-augment/src/substrate/consts.ts on lines 1618..1645

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

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

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

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

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

Refactorings

Further Reading

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

    fastUnstake: {
      /**
       * See [`Pallet::control`].
       **/
      control: AugmentedSubmittable<(erasToCheck: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 1132..1203
packages/api-augment/src/substrate/tx.ts on lines 2431..2502

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

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

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

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

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

Refactorings

Further Reading

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

    fastUnstake: {
      /**
       * Control the operation of this pallet.
       * 
       * ## Dispatch Origin
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/polkadot/tx.ts on lines 526..543
packages/api-augment/src/substrate/tx.ts on lines 2431..2502

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

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

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

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

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

Refactorings

Further Reading

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

    nftFractionalization: {
      /**
       * The deposit paid by the user locking an NFT. The deposit is returned to the original NFT
       * owner when the asset is unified and the NFT is unlocked.
       **/
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 3 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 950..977
packages/api-augment/src/substrate/consts.ts on lines 18..43
packages/api-augment/src/substrate/consts.ts on lines 1618..1645

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

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

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

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

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

Refactorings

Further Reading

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

    fastUnstake: {
      /**
       * Control the operation of this pallet.
       * 
       * ## Dispatch Origin
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 2 other locations - About 5 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 1132..1203
packages/api-augment/src/polkadot/tx.ts on lines 526..543

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

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