polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  interface PalletTreasuryProposal extends Struct {
    readonly proposer: AccountId32;
    readonly value: u128;
    readonly beneficiary: AccountId32;
    readonly bond: 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 7054..7059
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 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 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 17 locations. Consider refactoring.
Open

export interface ActiveRecovery extends Struct {
  readonly created: BlockNumber;
  readonly deposit: Balance;
  readonly friends: Vec<AccountId>;
}
Severity: Major
Found in packages/types/src/interfaces/recovery/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/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

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

export interface EthStorageProof extends Struct {
  readonly key: U256;
  readonly value: U256;
  readonly proof: Vec<Bytes>;
}
Severity: Major
Found in packages/types/src/interfaces/eth/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/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 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 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 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 ValidationFunctionParams extends Struct {
  readonly maxCodeSize: u32;
  readonly relayChainHeight: RelayChainBlockNumber;
  readonly codeUpgradeAllowed: Option<RelayChainBlockNumber>;
}
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 490..494
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 PolkadotPrimitivesV7SlashingDisputeProof extends Struct {
    readonly timeSlot: PolkadotPrimitivesV7SlashingDisputesTimeSlot;
    readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind;
    readonly validatorIndex: u32;
    readonly validatorId: PolkadotPrimitivesV7ValidatorAppPublic;
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 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 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 9 locations. Consider refactoring.
Open

export interface QueryResponseInfoV4 extends Struct {
  readonly destination: MultiLocationV4;
  readonly queryId: Compact<u64>;
  readonly maxWeight: WeightV2;
}
Severity: Major
Found in packages/types/src/interfaces/xcm/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/session/types.ts on lines 22..26
packages/types/src/interfaces/xcm/types.ts on lines 1379..1383

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 ContractMetadataV0 extends Struct {
  readonly metadataVersion: Text;
  readonly types: Vec<Si0Type>;
  readonly spec: ContractContractSpecV0;
}
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/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/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

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

export interface EventRecord extends Struct {
  readonly phase: Phase;
  readonly event: Event;
  readonly topics: Vec<Hash>;
}
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 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 GrandpaCommit extends Struct {
  readonly targetHash: BlockHash;
  readonly targetNumber: BlockNumber;
  readonly precommits: Vec<GrandpaSignedPrecommit>;
}
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 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 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 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

Severity
Category
Status
Source
Language