polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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 PalletAssetsAssetAccount extends Struct {
    readonly balance: u128;
    readonly status: PalletAssetsAccountStatus;
    readonly reason: PalletAssetsExistenceReason;
    readonly extra: Null;
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 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 16 locations. Consider refactoring.
Open

  interface PolkadotPrimitivesV6PvfCheckStatement extends Struct {
    readonly accept: bool;
    readonly subject: H256;
    readonly sessionIndex: u32;
    readonly validatorIndex: u32;
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 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 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 PalletMixnetRegistration extends Struct {
    readonly blockNumber: u32;
    readonly sessionIndex: u32;
    readonly authorityIndex: u32;
    readonly mixnode: PalletMixnetBoundedMixnode;
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 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 17 locations. Consider refactoring.
Open

export interface InstantiateReturnValueTo267 extends Struct {
  readonly result: ExecReturnValue;
  readonly accountId: AccountId;
  readonly rentProjection: Option<RentProjection>;
}
Severity: Major
Found in packages/types/src/interfaces/contracts/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/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 17 locations. Consider refactoring.
Open

export interface GrandpaJustification extends Struct {
  readonly round: u64;
  readonly commit: GrandpaCommit;
  readonly votesAncestries: Vec<Header>;
}
Severity: Major
Found in packages/types/src/interfaces/grandpa/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 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 17 locations. Consider refactoring.
Open

export interface FunctionArgumentMetadataV14 extends Struct {
  readonly name: Text;
  readonly type: Type;
  readonly typeName: Option<Type>;
}
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 96..100
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 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 PalletNftFractionalizationDetails extends Struct {
    readonly asset: u32;
    readonly fractions: u128;
    readonly deposit: u128;
    readonly assetCreator: AccountId32;
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 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 17 locations. Consider refactoring.
Open

export interface SyncState extends Struct {
  readonly startingBlock: BlockNumber;
  readonly currentBlock: BlockNumber;
  readonly highestBlock: Option<BlockNumber>;
}
Severity: Major
Found in packages/types/src/interfaces/system/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 23..27
packages/types/src/interfaces/state/types.ts on lines 74..78
packages/types/src/interfaces/system/types.ts on lines 258..262

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 CodeUploadRequest extends Struct {
  readonly origin: AccountId;
  readonly code: Bytes;
  readonly storageDepositLimit: Option<Balance>;
}
Severity: Major
Found in packages/types/src/interfaces/contracts/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 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 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 16 locations. Consider refactoring.
Open

  interface PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType extends Struct {
    readonly traffic: u128;
    readonly nextIndex: u32;
    readonly smallestIndex: u32;
    readonly freedIndices: BinaryHeapReverseQueueIndex;
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 321..326
packages/types-augment/src/lookup/types-kusama.ts on lines 329..334
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 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 SpConsensusSlotsEquivocationProof extends Struct {
    readonly offender: SpConsensusBabeAppPublic;
    readonly slot: u64;
    readonly firstHeader: SpRuntimeHeader;
    readonly secondHeader: SpRuntimeHeader;
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 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 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 17 locations. Consider refactoring.
Open

export interface ReportedRoundStates extends Struct {
  readonly setId: u32;
  readonly best: RoundState;
  readonly background: Vec<RoundState>;
}
Severity: Major
Found in packages/types/src/interfaces/grandpa/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/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 17 locations. Consider refactoring.
Open

export interface LocalValidationData extends Struct {
  readonly parentHead: HeadData;
  readonly balance: Balance;
  readonly codeUpgradeAllowed: Option<BlockNumber>;
}
Severity: Major
Found in packages/types/src/interfaces/parachains/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 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

Severity
Category
Status
Source
Language