polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

export interface DefunctVoter extends Struct {
  readonly who: AccountId;
  readonly voteCount: Compact<u32>;
  readonly candidateCount: Compact<u32>;
}
Severity: Major
Found in packages/types/src/interfaces/elections/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface FunctionMetadataV9 extends Struct {
  readonly name: Text;
  readonly args: Vec<FunctionArgumentMetadataV9>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface RuntimeApiMetadataV15 extends Struct {
  readonly name: Text;
  readonly methods: Vec<RuntimeApiMethodMetadataV15>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169

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

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

export interface BlockV1 extends Struct {
  readonly header: EthHeader;
  readonly transactions: Vec<TransactionV1>;
  readonly ommers: Vec<EthHeader>;
}
Severity: Major
Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface BlockAttestations extends Struct {
  readonly receipt: CandidateReceipt;
  readonly valid: Vec<AccountId>;
  readonly invalid: Vec<AccountId>;
}
Severity: Major
Found in packages/types/src/interfaces/attestations/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface ContractEventSpecV0 extends Struct {
  readonly name: Text;
  readonly args: Vec<ContractEventParamSpecV0>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface ContractEventSpecV1 extends Struct {
  readonly name: Text;
  readonly args: Vec<ContractEventParamSpecV0>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface BlockV2 extends Struct {
  readonly header: EthHeader;
  readonly transactions: Vec<TransactionV2>;
  readonly ommers: Vec<EthHeader>;
}
Severity: Major
Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface EthBlock extends Struct {
  readonly header: EthHeader;
  readonly transactions: Vec<EthTransaction>;
  readonly ommers: Vec<EthHeader>;
}
Severity: Major
Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

export interface ContractEventSpecV2 extends Struct {
  readonly label: Text;
  readonly args: Vec<ContractEventParamSpecV2>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 74..78
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

  call: {
    description: 'Call contract, returning the output data.',
    params: [
      {
        name: 'request',
Severity: Major
Found in packages/types/src/interfaces/eth/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 83..98
packages/types/src/interfaces/eth/rpc.ts on lines 122..137
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/eth/rpc.ts on lines 305..320
packages/types/src/interfaces/state/rpc.ts on lines 233..248
packages/types/src/interfaces/state/rpc.ts on lines 333..348

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

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

  queryStorageAt: {
    description: 'Query storage entries (by key) starting at block hash given as the second parameter',
    params: [
      {
        name: 'keys',
Severity: Major
Found in packages/types/src/interfaces/state/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 57..72
packages/types/src/interfaces/eth/rpc.ts on lines 83..98
packages/types/src/interfaces/eth/rpc.ts on lines 122..137
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/eth/rpc.ts on lines 305..320
packages/types/src/interfaces/state/rpc.ts on lines 233..248

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

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

export interface EventMetadataV9 extends Struct {
  readonly name: Text;
  readonly args: Vec<Type>;
  readonly docs: Vec<Text>;
}
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 11 other locations - About 1 hr to fix
packages/types/src/interfaces/attestations/types.ts on lines 10..14
packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
packages/types/src/interfaces/elections/types.ts on lines 12..16
packages/types/src/interfaces/eth/types.ts on lines 9..13
packages/types/src/interfaces/eth/types.ts on lines 16..20
packages/types/src/interfaces/eth/types.ts on lines 23..27
packages/types/src/interfaces/eth/types.ts on lines 84..88
packages/types/src/interfaces/metadata/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

  getBalance: {
    description: 'Returns balance of the given account.',
    params: [
      {
        name: 'address',
Severity: Major
Found in packages/types/src/interfaces/eth/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 57..72
packages/types/src/interfaces/eth/rpc.ts on lines 83..98
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/eth/rpc.ts on lines 305..320
packages/types/src/interfaces/state/rpc.ts on lines 233..248
packages/types/src/interfaces/state/rpc.ts on lines 333..348

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

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

  estimateGas: {
    description: 'Estimate gas needed for execution of given contract.',
    params: [
      {
        name: 'request',
Severity: Major
Found in packages/types/src/interfaces/eth/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 57..72
packages/types/src/interfaces/eth/rpc.ts on lines 122..137
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/eth/rpc.ts on lines 305..320
packages/types/src/interfaces/state/rpc.ts on lines 233..248
packages/types/src/interfaces/state/rpc.ts on lines 333..348

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

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

  getReadProof: {
    description: 'Returns proof of storage entries at a specific block state',
    params: [
      {
        name: 'keys',
Severity: Major
Found in packages/types/src/interfaces/state/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 57..72
packages/types/src/interfaces/eth/rpc.ts on lines 83..98
packages/types/src/interfaces/eth/rpc.ts on lines 122..137
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/eth/rpc.ts on lines 305..320
packages/types/src/interfaces/state/rpc.ts on lines 333..348

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

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

  interface PalletStakingSlashingSlashingSpans extends Struct {
    readonly spanIndex: u32;
    readonly lastStart: u32;
    readonly lastNonzeroSlash: u32;
    readonly prior: Vec<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 539..544
packages/types-augment/src/lookup/types-polkadot.ts on lines 3142..3147
packages/types-augment/src/lookup/types-substrate.ts on lines 7891..7896

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

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

        {
          displayName: undefined,
          info: TypeDefInfo.Option,
          name: undefined,
          sub: {
Severity: Major
Found in packages/types-create/src/util/getTypeDef.spec.ts and 3 other locations - About 1 hr to fix
packages/types-create/src/util/getTypeDef.spec.ts on lines 51..62
packages/types-create/src/util/getTypeDef.spec.ts on lines 143..154
packages/types-create/src/util/getTypeDef.spec.ts on lines 155..166

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

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

  getTransactionCount: {
    description: 'Returns the number of transactions sent from given address at given time (block number).',
    params: [
      {
        name: 'address',
Severity: Major
Found in packages/types/src/interfaces/eth/rpc.ts and 6 other locations - About 1 hr to fix
packages/types/src/interfaces/eth/rpc.ts on lines 57..72
packages/types/src/interfaces/eth/rpc.ts on lines 83..98
packages/types/src/interfaces/eth/rpc.ts on lines 122..137
packages/types/src/interfaces/eth/rpc.ts on lines 183..198
packages/types/src/interfaces/state/rpc.ts on lines 233..248
packages/types/src/interfaces/state/rpc.ts on lines 333..348

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

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

  interface PalletMultisigMultisig extends Struct {
    readonly when: PalletMultisigTimepoint;
    readonly deposit: u128;
    readonly depositor: AccountId32;
    readonly approvals: Vec<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 539..544
packages/types-augment/src/lookup/types-polkadot.ts on lines 3142..3147
packages/types-augment/src/lookup/types-substrate.ts on lines 7133..7138

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

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