polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

export interface Mixnode extends Struct {
  readonly externalAddresses: Vec<Bytes>;
  readonly kxPublic: U8aFixed;
  readonly peerId: U8aFixed;
}
Severity: Major
Found in packages/types/src/interfaces/mixnet/types.ts and 6 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 339..343
packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
packages/types/src/interfaces/democracy/types.ts on lines 145..149
packages/types/src/interfaces/identity/types.ts on lines 73..77
packages/types/src/interfaces/staking/types.ts on lines 190..194
packages/types/src/interfaces/staking/types.ts on lines 414..418

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

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

export interface ExtrinsicMetadataV14 extends Struct {
  readonly type: SiLookupTypeId;
  readonly version: u8;
  readonly signedExtensions: Vec<SignedExtensionMetadataV14>;
}
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 16 other locations - About 45 mins to fix
packages/types/src/interfaces/benchmark/types.ts on lines 25..29
packages/types/src/interfaces/contracts/types.ts on lines 34..38
packages/types/src/interfaces/contracts/types.ts on lines 356..360
packages/types/src/interfaces/eth/types.ts on lines 278..282
packages/types/src/interfaces/grandpa/types.ts on lines 67..71
packages/types/src/interfaces/grandpa/types.ts on lines 97..101
packages/types/src/interfaces/grandpa/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 128..132
packages/types/src/interfaces/parachains/types.ts on lines 490..494
packages/types/src/interfaces/parachains/types.ts on lines 930..934
packages/types/src/interfaces/recovery/types.ts on lines 8..12
packages/types/src/interfaces/staking/types.ts on lines 295..299
packages/types/src/interfaces/state/types.ts on lines 23..27
packages/types/src/interfaces/state/types.ts on lines 74..78
packages/types/src/interfaces/system/types.ts on lines 258..262
packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV7PvfCheckStatement extends Struct {
    readonly accept: bool;
    readonly subject: H256;
    readonly sessionIndex: u32;
    readonly validatorIndex: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

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

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

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

Refactorings

Further Reading

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

export interface EvmLog extends Struct {
  readonly address: H160;
  readonly topics: Vec<H256>;
  readonly data: Bytes;
}
Severity: Major
Found in packages/types/src/interfaces/evm/types.ts and 8 other locations - About 45 mins to fix
packages/types/src/interfaces/bridges/types.ts on lines 86..90
packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
packages/types/src/interfaces/parachains/types.ts on lines 68..72
packages/types/src/interfaces/parachains/types.ts on lines 90..94
packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
packages/types/src/interfaces/session/types.ts on lines 22..26
packages/types/src/interfaces/xcm/types.ts on lines 1379..1383
packages/types/src/interfaces/xcm/types.ts on lines 1386..1390

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletElectionProviderMultiPhaseSignedSignedSubmission extends Struct {
    readonly who: AccountId32;
    readonly deposit: u128;
    readonly rawSolution: PalletElectionProviderMultiPhaseRawSolution;
    readonly callFee: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

export interface Registration extends Struct {
  readonly judgements: Vec<RegistrationJudgement>;
  readonly deposit: Balance;
  readonly info: IdentityInfo;
}
Severity: Major
Found in packages/types/src/interfaces/identity/types.ts and 6 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 339..343
packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
packages/types/src/interfaces/democracy/types.ts on lines 145..149
packages/types/src/interfaces/mixnet/types.ts on lines 7..11
packages/types/src/interfaces/staking/types.ts on lines 190..194
packages/types/src/interfaces/staking/types.ts on lines 414..418

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

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

export interface BenchmarkList extends Struct {
  readonly pallet: Bytes;
  readonly instance: Bytes;
  readonly benchmarks: Vec<BenchmarkMetadata>;
}
Severity: Major
Found in packages/types/src/interfaces/benchmark/types.ts and 16 other locations - About 45 mins to fix
packages/types/src/interfaces/contracts/types.ts on lines 34..38
packages/types/src/interfaces/contracts/types.ts on lines 356..360
packages/types/src/interfaces/eth/types.ts on lines 278..282
packages/types/src/interfaces/grandpa/types.ts on lines 67..71
packages/types/src/interfaces/grandpa/types.ts on lines 97..101
packages/types/src/interfaces/grandpa/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 96..100
packages/types/src/interfaces/metadata/types.ts on lines 128..132
packages/types/src/interfaces/parachains/types.ts on lines 490..494
packages/types/src/interfaces/parachains/types.ts on lines 930..934
packages/types/src/interfaces/recovery/types.ts on lines 8..12
packages/types/src/interfaces/staking/types.ts on lines 295..299
packages/types/src/interfaces/state/types.ts on lines 23..27
packages/types/src/interfaces/state/types.ts on lines 74..78
packages/types/src/interfaces/system/types.ts on lines 258..262
packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

export interface ContractMetadataV4 extends Struct {
  readonly types: Vec<PortableType>;
  readonly spec: ContractContractSpecV4;
  readonly version: Text;
}
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 6 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
packages/types/src/interfaces/democracy/types.ts on lines 145..149
packages/types/src/interfaces/identity/types.ts on lines 73..77
packages/types/src/interfaces/mixnet/types.ts on lines 7..11
packages/types/src/interfaces/staking/types.ts on lines 190..194
packages/types/src/interfaces/staking/types.ts on lines 414..418

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

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

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

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

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

Refactorings

Further Reading

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

export interface BackedCandidate extends Struct {
  readonly candidate: CommittedCandidateReceipt;
  readonly validityVotes: Vec<ValidityAttestation>;
  readonly validatorIndices: BitVec;
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 8 other locations - About 45 mins to fix
packages/types/src/interfaces/bridges/types.ts on lines 86..90
packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
packages/types/src/interfaces/evm/types.ts on lines 48..52
packages/types/src/interfaces/parachains/types.ts on lines 68..72
packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
packages/types/src/interfaces/session/types.ts on lines 22..26
packages/types/src/interfaces/xcm/types.ts on lines 1379..1383
packages/types/src/interfaces/xcm/types.ts on lines 1386..1390

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV6SlashingDisputeProof extends Struct {
    readonly timeSlot: PolkadotPrimitivesV6SlashingDisputesTimeSlot;
    readonly kind: PolkadotPrimitivesV6SlashingSlashingOffenceKind;
    readonly validatorIndex: u32;
    readonly validatorId: PolkadotPrimitivesV6ValidatorAppPublic;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletTransactionStorageTransactionInfo extends Struct {
    readonly chunkRoot: H256;
    readonly contentHash: H256;
    readonly size_: u32;
    readonly blockChunks: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351

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

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

export interface Nominations extends Struct {
  readonly targets: Vec<AccountId>;
  readonly submittedIn: EraIndex;
  readonly suppressed: bool;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 6 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 339..343
packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
packages/types/src/interfaces/democracy/types.ts on lines 145..149
packages/types/src/interfaces/identity/types.ts on lines 73..77
packages/types/src/interfaces/mixnet/types.ts on lines 7..11
packages/types/src/interfaces/staking/types.ts on lines 414..418

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

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

export interface SlashingSpansTo204 extends Struct {
  readonly spanIndex: SpanIndex;
  readonly lastStart: EraIndex;
  readonly prior: Vec<EraIndex>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 16 other locations - About 45 mins to fix
packages/types/src/interfaces/benchmark/types.ts on lines 25..29
packages/types/src/interfaces/contracts/types.ts on lines 34..38
packages/types/src/interfaces/contracts/types.ts on lines 356..360
packages/types/src/interfaces/eth/types.ts on lines 278..282
packages/types/src/interfaces/grandpa/types.ts on lines 67..71
packages/types/src/interfaces/grandpa/types.ts on lines 97..101
packages/types/src/interfaces/grandpa/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 96..100
packages/types/src/interfaces/metadata/types.ts on lines 128..132
packages/types/src/interfaces/parachains/types.ts on lines 490..494
packages/types/src/interfaces/parachains/types.ts on lines 930..934
packages/types/src/interfaces/recovery/types.ts on lines 8..12
packages/types/src/interfaces/state/types.ts on lines 23..27
packages/types/src/interfaces/state/types.ts on lines 74..78
packages/types/src/interfaces/system/types.ts on lines 258..262
packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

export interface BlockTraceEvent extends Struct {
  readonly target: Text;
  readonly data: BlockTraceEventData;
  readonly parentId: Option<u64>;
}
Severity: Major
Found in packages/types/src/interfaces/state/types.ts and 16 other locations - About 45 mins to fix
packages/types/src/interfaces/benchmark/types.ts on lines 25..29
packages/types/src/interfaces/contracts/types.ts on lines 34..38
packages/types/src/interfaces/contracts/types.ts on lines 356..360
packages/types/src/interfaces/eth/types.ts on lines 278..282
packages/types/src/interfaces/grandpa/types.ts on lines 67..71
packages/types/src/interfaces/grandpa/types.ts on lines 97..101
packages/types/src/interfaces/grandpa/types.ts on lines 165..169
packages/types/src/interfaces/metadata/types.ts on lines 96..100
packages/types/src/interfaces/metadata/types.ts on lines 128..132
packages/types/src/interfaces/parachains/types.ts on lines 490..494
packages/types/src/interfaces/parachains/types.ts on lines 930..934
packages/types/src/interfaces/recovery/types.ts on lines 8..12
packages/types/src/interfaces/staking/types.ts on lines 295..299
packages/types/src/interfaces/state/types.ts on lines 74..78
packages/types/src/interfaces/system/types.ts on lines 258..262
packages/types/src/interfaces/system/types.ts on lines 420..424

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletSocietyGroupParams extends Struct {
    readonly maxMembers: u32;
    readonly maxIntake: u32;
    readonly maxStrikes: u32;
    readonly candidateDeposit: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletImOnlineHeartbeat extends Struct {
    readonly blockNumber: u32;
    readonly sessionIndex: u32;
    readonly authorityIndex: u32;
    readonly validatorsLen: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 4805..4810
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNftsItemTip extends Struct {
    readonly collection: u32;
    readonly item: u32;
    readonly receiver: AccountId32;
    readonly amount: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 15 other locations - About 45 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
packages/types-augment/src/lookup/types-kusama.ts on lines 559..564
packages/types-augment/src/lookup/types-polkadot.ts on lines 984..989
packages/types-augment/src/lookup/types-polkadot.ts on lines 1082..1087
packages/types-augment/src/lookup/types-substrate.ts on lines 26..31
packages/types-augment/src/lookup/types-substrate.ts on lines 1167..1172
packages/types-augment/src/lookup/types-substrate.ts on lines 2587..2592
packages/types-augment/src/lookup/types-substrate.ts on lines 3430..3435
packages/types-augment/src/lookup/types-substrate.ts on lines 5930..5935
packages/types-augment/src/lookup/types-substrate.ts on lines 7054..7059
packages/types-augment/src/lookup/types-substrate.ts on lines 7387..7392
packages/types-augment/src/lookup/types-substrate.ts on lines 8014..8019
packages/types-augment/src/lookup/types-substrate.ts on lines 8346..8351
packages/types-augment/src/lookup/types-substrate.ts on lines 8432..8437

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

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

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

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

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

Refactorings

Further Reading

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

export interface MembershipProof extends Struct {
  readonly session: SessionIndex;
  readonly trieNodes: Vec<Bytes>;
  readonly validatorCount: ValidatorCount;
}
Severity: Major
Found in packages/types/src/interfaces/session/types.ts and 8 other locations - About 45 mins to fix
packages/types/src/interfaces/bridges/types.ts on lines 86..90
packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
packages/types/src/interfaces/evm/types.ts on lines 48..52
packages/types/src/interfaces/parachains/types.ts on lines 68..72
packages/types/src/interfaces/parachains/types.ts on lines 90..94
packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
packages/types/src/interfaces/xcm/types.ts on lines 1379..1383
packages/types/src/interfaces/xcm/types.ts on lines 1386..1390

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

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

export interface VotingDirect extends Struct {
  readonly votes: Vec<VotingDirectVote>;
  readonly delegations: Delegations;
  readonly prior: PriorLock;
}
Severity: Major
Found in packages/types/src/interfaces/democracy/types.ts and 6 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 339..343
packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
packages/types/src/interfaces/identity/types.ts on lines 73..77
packages/types/src/interfaces/mixnet/types.ts on lines 7..11
packages/types/src/interfaces/staking/types.ts on lines 190..194
packages/types/src/interfaces/staking/types.ts on lines 414..418

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

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

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

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

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

Refactorings

Further Reading

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

export interface MessagesDeliveryProofOf extends Struct {
  readonly bridgedHeaderHash: BlockHash;
  readonly storageProof: Vec<Bytes>;
  readonly lane: LaneId;
}
Severity: Major
Found in packages/types/src/interfaces/bridges/types.ts and 8 other locations - About 45 mins to fix
packages/types/src/interfaces/contractsAbi/types.ts on lines 314..318
packages/types/src/interfaces/evm/types.ts on lines 48..52
packages/types/src/interfaces/parachains/types.ts on lines 68..72
packages/types/src/interfaces/parachains/types.ts on lines 90..94
packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
packages/types/src/interfaces/session/types.ts on lines 22..26
packages/types/src/interfaces/xcm/types.ts on lines 1379..1383
packages/types/src/interfaces/xcm/types.ts on lines 1386..1390

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

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