polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  [
    14433840,
    9280,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    17335450,
    9381,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13800015,
    9340,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13649433,
    9340,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    13847400,
    9360,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

  [
    14576855,
    9380,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4090..4159

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

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

  [
    14249200,
    9370,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3762..3831
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3832..3901
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3902..3971
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3972..4041
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4042..4111
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4112..4181
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4182..4251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4252..4321
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4322..4391
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2492..2561
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2562..2631
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2632..2701
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2702..2771
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2772..2841
packages/types-known/src/upgrades/e2e/westend.ts on lines 3460..3529
packages/types-known/src/upgrades/e2e/westend.ts on lines 3530..3599
packages/types-known/src/upgrades/e2e/westend.ts on lines 3600..3669
packages/types-known/src/upgrades/e2e/westend.ts on lines 3670..3739
packages/types-known/src/upgrades/e2e/westend.ts on lines 3740..3809
packages/types-known/src/upgrades/e2e/westend.ts on lines 3810..3879
packages/types-known/src/upgrades/e2e/westend.ts on lines 3880..3949
packages/types-known/src/upgrades/e2e/westend.ts on lines 3950..4019
packages/types-known/src/upgrades/e2e/westend.ts on lines 4020..4089
packages/types-known/src/upgrades/e2e/westend.ts on lines 4160..4229

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

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

export class ContractRx extends Contract<'rxjs'> {
  constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
    super(api, abi, address, toRxMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/rx/index.ts and 3 other locations - About 1 hr to fix
packages/api-contract/src/promise/index.ts on lines 12..16
packages/api-contract/src/promise/index.ts on lines 24..28
packages/api-contract/src/rx/index.ts on lines 12..16

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

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

export class ContractPromise extends Contract<'promise'> {
  constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
    super(api, abi, address, toPromiseMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/promise/index.ts and 3 other locations - About 1 hr to fix
packages/api-contract/src/promise/index.ts on lines 12..16
packages/api-contract/src/rx/index.ts on lines 12..16
packages/api-contract/src/rx/index.ts on lines 24..28

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

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

export class BlueprintPromise extends Blueprint<'promise'> {
  constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
    super(api, abi, codeHash, toPromiseMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/promise/index.ts and 3 other locations - About 1 hr to fix
packages/api-contract/src/promise/index.ts on lines 24..28
packages/api-contract/src/rx/index.ts on lines 12..16
packages/api-contract/src/rx/index.ts on lines 24..28

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

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

export class BlueprintRx extends Blueprint<'rxjs'> {
  constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
    super(api, abi, codeHash, toRxMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/rx/index.ts and 3 other locations - About 1 hr to fix
packages/api-contract/src/promise/index.ts on lines 12..16
packages/api-contract/src/promise/index.ts on lines 24..28
packages/api-contract/src/rx/index.ts on lines 24..28

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

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

export const runtime: DefinitionsCall = {
  LocationToAccountApi: [
    {
      methods: {
        convert_location: {
Severity: Major
Found in packages/types/src/interfaces/xcmRuntimeApi/runtime.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/runtime.ts on lines 6..24
packages/types/src/interfaces/staking/runtime.ts on lines 6..24
packages/types/src/interfaces/system/runtime.ts on lines 6..24

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

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

export const runtime: DefinitionsCall = {
  AssetsApi: [
    {
      methods: {
        account_balances: {
Severity: Major
Found in packages/types/src/interfaces/assets/runtime.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/staking/runtime.ts on lines 6..24
packages/types/src/interfaces/system/runtime.ts on lines 6..24
packages/types/src/interfaces/xcmRuntimeApi/runtime.ts on lines 6..24

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

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

export const runtime: DefinitionsCall = {
  AccountNonceApi: [
    {
      methods: {
        account_nonce: {
Severity: Major
Found in packages/types/src/interfaces/system/runtime.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/runtime.ts on lines 6..24
packages/types/src/interfaces/staking/runtime.ts on lines 6..24
packages/types/src/interfaces/xcmRuntimeApi/runtime.ts on lines 6..24

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

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

export const runtime: DefinitionsCall = {
  StakingApi: [
    {
      methods: {
        nominations_quota: {
Severity: Major
Found in packages/types/src/interfaces/staking/runtime.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/runtime.ts on lines 6..24
packages/types/src/interfaces/system/runtime.ts on lines 6..24
packages/types/src/interfaces/xcmRuntimeApi/runtime.ts on lines 6..24

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

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

  interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
    readonly isNever: boolean;
    readonly isPreEnding: boolean;
    readonly asPreEnding: u32;
    readonly isEnding: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1911..1918
packages/types-augment/src/lookup/types-substrate.ts on lines 673..680

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

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

  interface PalletDemocracyMetadataOwner extends Enum {
    readonly isExternal: boolean;
    readonly isProposal: boolean;
    readonly asProposal: u32;
    readonly isReferendum: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1911..1918
packages/types-augment/src/lookup/types-polkadot.ts on lines 3240..3247

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

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

  interface XcmV3MaybeErrorCode extends Enum {
    readonly isSuccess: boolean;
    readonly isError: boolean;
    readonly asError: Bytes;
    readonly isTruncatedError: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3240..3247
packages/types-augment/src/lookup/types-substrate.ts on lines 673..680

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

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

        custom_attribute: {
          description: 'A custom attribute',
          params: [
            {
              name: 'account',
Severity: Major
Found in packages/types/src/interfaces/nfts/runtime.ts and 2 other locations - About 1 hr to fix
packages/types/src/interfaces/assetConversion/runtime.ts on lines 24..45
packages/types/src/interfaces/assetConversion/runtime.ts on lines 46..67

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

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

        quote_price_exact_tokens_for_tokens: {
          description: 'Quote price: exact tokens for tokens',
          params: [
            {
              name: 'asset1',
Severity: Major
Found in packages/types/src/interfaces/assetConversion/runtime.ts and 2 other locations - About 1 hr to fix
packages/types/src/interfaces/assetConversion/runtime.ts on lines 46..67
packages/types/src/interfaces/nfts/runtime.ts on lines 52..73

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

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