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

export interface ContractMessageSpecV0 extends Struct {
  readonly name: Text;
  readonly selector: ContractSelector;
  readonly mutates: bool;
  readonly payable: bool;
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 3 hrs to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 271..279

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

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

    it('constructs via boolean true', (): void => {
      expect(new GenericVote(registry, true).toU8a()).toEqual(new Uint8Array([128]));
      expect(new GenericVote(registry, true).isAye).toBe(true);
      expect(new GenericVote(registry, true).isNay).toBe(false);
    });
Severity: Major
Found in packages/types/src/generic/Vote.spec.ts and 1 other location - About 3 hrs to fix
packages/types/src/generic/Vote.spec.ts on lines 19..23

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

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

export interface ContractMessageSpecV2 extends Struct {
  readonly label: Text;
  readonly selector: ContractSelector;
  readonly mutates: bool;
  readonly payable: bool;
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 3 hrs to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 249..257

Duplicated Code

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

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

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

Tuning

This issue has a mass of 98.

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

    it('constructs via boolean false', (): void => {
      expect(new GenericVote(registry, false).toU8a()).toEqual(new Uint8Array([0]));
      expect(new GenericVote(registry, false).isNay).toBe(true);
      expect(new GenericVote(registry, false).isAye).toBe(false);
    });
Severity: Major
Found in packages/types/src/generic/Vote.spec.ts and 1 other location - About 3 hrs to fix
packages/types/src/generic/Vote.spec.ts on lines 13..17

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

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

      instaPoolContribution: AugmentedQuery<ApiType, (arg: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => Observable<Option<PalletBrokerContributionRecord>>, [PalletBrokerRegionId]> & QueryableStorageEntry<ApiType, [PalletBrokerRegionId]>;
Severity: Major
Found in packages/api-augment/src/substrate/query.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/substrate/query.ts on lines 444..444

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

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

      reportFutureBlockVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/substrate/tx.ts on lines 1037..1037

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

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

      regions: AugmentedQuery<ApiType, (arg: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => Observable<Option<PalletBrokerRegionRecord>>, [PalletBrokerRegionId]> & QueryableStorageEntry<ApiType, [PalletBrokerRegionId]>;
Severity: Major
Found in packages/api-augment/src/substrate/query.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/substrate/query.ts on lines 422..422

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

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

      reportFutureBlockVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 1 other location - About 3 hrs to fix
packages/api-augment/src/substrate/tx.ts on lines 1026..1026

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

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

    lottery: {
      /**
       * The max number of calls available in a single lottery.
       **/
      maxCalls: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    crowdloan: {
      /**
       * The minimum amount that may be contributed into a crowdloan. Should almost certainly be
       * at least `ExistentialDeposit`.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    multisig: {
      /**
       * The base amount of currency needed to reserve for creating a multisig execution or to
       * store a dispatch call for later.
       * 
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    multisig: {
      /**
       * The base amount of currency needed to reserve for creating a multisig execution or to
       * store a dispatch call for later.
       * 
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    crowdloan: {
      /**
       * The minimum amount that may be contributed into a crowdloan. Should almost certainly be
       * at least `ExistentialDeposit`.
       **/
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    nominationPools: {
      /**
       * The maximum pool points-to-balance ratio that an `open` pool can have.
       * 
       * This is important in the event slashing takes place and the pool's points-to-balance
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    multisig: {
      /**
       * The base amount of currency needed to reserve for creating a multisig execution or to
       * store a dispatch call for later.
       * 
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    onDemandAssignmentProvider: {
      /**
       * The maximum number of blocks some historical revenue
       * information stored for.
       **/
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    grandpa: {
      /**
       * Max Authorities in use
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    nominationPools: {
      /**
       * The maximum pool points-to-balance ratio that an `open` pool can have.
       * 
       * This is important in the event slashing takes place and the pool's points-to-balance
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    nominationPools: {
      /**
       * The maximum pool points-to-balance ratio that an `open` pool can have.
       * 
       * This is important in the event slashing takes place and the pool's points-to-balance
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 98..120
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

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

    beefy: {
      /**
       * The maximum number of authorities that can be added.
       **/
      maxAuthorities: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 16 other locations - About 3 hrs to fix
packages/api-augment/src/kusama/consts.ts on lines 223..242
packages/api-augment/src/kusama/consts.ts on lines 350..372
packages/api-augment/src/kusama/consts.ts on lines 420..444
packages/api-augment/src/kusama/consts.ts on lines 542..570
packages/api-augment/src/kusama/consts.ts on lines 571..589
packages/api-augment/src/polkadot/consts.ts on lines 94..116
packages/api-augment/src/polkadot/consts.ts on lines 205..224
packages/api-augment/src/polkadot/consts.ts on lines 311..333
packages/api-augment/src/polkadot/consts.ts on lines 413..437
packages/api-augment/src/polkadot/consts.ts on lines 438..466
packages/api-augment/src/substrate/consts.ts on lines 188..210
packages/api-augment/src/substrate/consts.ts on lines 636..658
packages/api-augment/src/substrate/consts.ts on lines 723..742
packages/api-augment/src/substrate/consts.ts on lines 852..876
packages/api-augment/src/substrate/consts.ts on lines 1030..1058
packages/api-augment/src/substrate/consts.ts on lines 1277..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 95.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language