polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  interface PalletStateTrieMigrationMigrationTask extends Struct {
    readonly progressTop: PalletStateTrieMigrationProgress;
    readonly progressChild: PalletStateTrieMigrationProgress;
    readonly size_: u32;
    readonly topItems: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

export interface PalletConstantMetadataV14 extends Struct {
  readonly name: Text;
  readonly type: SiLookupTypeId;
  readonly value: Bytes;
  readonly docs: Vec<Text>;
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface ContractEventParamSpecV0 extends Struct {
  readonly name: Text;
  readonly indexed: bool;
  readonly type: ContractTypeSpec;
  readonly docs: Vec<Text>;
Severity: Major
Found in packages/types/src/interfaces/contractsAbi/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface DisputeState extends Struct {
  readonly validatorsFor: BitVec;
  readonly validatorsAgainst: BitVec;
  readonly start: BlockNumber;
  readonly concludedAt: Option<BlockNumber>;
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface BeefyCompactSignedCommitment extends Struct {
  readonly commitment: BeefyCommitment;
  readonly signaturesFrom: Bytes;
  readonly validatorSetLen: u32;
  readonly signaturesCompact: Vec<EcdsaSignature>;
Severity: Major
Found in packages/types/src/interfaces/beefy/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface ModuleConstantMetadataV9 extends Struct {
  readonly name: Text;
  readonly type: Type;
  readonly value: Bytes;
  readonly docs: Vec<Text>;
Severity: Major
Found in packages/types/src/interfaces/metadata/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface EvmCallInfo extends Struct {
  readonly exitReason: ExitReason;
  readonly value: Bytes;
  readonly usedGas: U256;
  readonly logs: Vec<EvmLog>;
Severity: Major
Found in packages/types/src/interfaces/evm/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface ForkTreePendingChangeNode extends Struct {
  readonly hash: BlockHash;
  readonly number: BlockNumber;
  readonly data: PendingChange;
  readonly children: Vec<ForkTreePendingChangeNode>;
Severity: Major
Found in packages/types/src/interfaces/grandpa/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

  interface PalletContractsScheduleLimits extends Struct {
    readonly eventTopics: u32;
    readonly memoryPages: u32;
    readonly subjectLen: u32;
    readonly payloadLen: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

  interface PalletAssetsAssetMetadata extends Struct {
    readonly deposit: u128;
    readonly name: Bytes;
    readonly symbol: Bytes;
    readonly decimals: u8;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

  interface PalletConvictionVotingVoteDelegating extends Struct {
    readonly balance: u128;
    readonly target: AccountId32;
    readonly conviction: PalletConvictionVotingConviction;
    readonly delegations: PalletConvictionVotingDelegations;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

  interface PalletBrokerStatusRecord extends Struct {
    readonly coreCount: u16;
    readonly privatePoolSize: u32;
    readonly systemPoolSize: u32;
    readonly lastCommittedTimeslice: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770

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

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

export interface BenchmarkBatch extends Struct {
  readonly pallet: Text;
  readonly instance: Text;
  readonly benchmark: Text;
  readonly results: Vec<BenchmarkResult>;
Severity: Major
Found in packages/types/src/interfaces/benchmark/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

  interface FrameSystemAccountInfo extends Struct {
    readonly nonce: u32;
    readonly consumers: u32;
    readonly providers: u32;
    readonly sufficients: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

  interface PalletNisSummaryRecord extends Struct {
    readonly proportionOwed: Perquintill;
    readonly index: u32;
    readonly thawed: Perquintill;
    readonly lastPeriod: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8102..8108
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

export interface Multisig extends Struct {
  readonly when: Timepoint;
  readonly deposit: Balance;
  readonly depositor: AccountId;
  readonly approvals: Vec<AccountId>;
Severity: Major
Found in packages/types/src/interfaces/utility/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292

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

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

export interface EvmCreateInfo extends Struct {
  readonly exitReason: ExitReason;
  readonly value: H160;
  readonly usedGas: U256;
  readonly logs: Vec<EvmLog>;
Severity: Major
Found in packages/types/src/interfaces/evm/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/staking/types.ts on lines 287..292
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

export interface SlashingSpans extends Struct {
  readonly spanIndex: SpanIndex;
  readonly lastStart: EraIndex;
  readonly lastNonzeroSlash: EraIndex;
  readonly prior: Vec<EraIndex>;
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 12 other locations - About 1 hr to fix
packages/types/src/interfaces/beefy/types.ts on lines 25..30
packages/types/src/interfaces/benchmark/types.ts on lines 8..13
packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
packages/types/src/interfaces/eth/types.ts on lines 405..410
packages/types/src/interfaces/evm/types.ts on lines 14..19
packages/types/src/interfaces/evm/types.ts on lines 31..36
packages/types/src/interfaces/grandpa/types.ts on lines 59..64
packages/types/src/interfaces/metadata/types.ts on lines 253..258
packages/types/src/interfaces/metadata/types.ts on lines 334..339
packages/types/src/interfaces/parachains/types.ts on lines 262..267
packages/types/src/interfaces/utility/types.ts on lines 8..13

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

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

  interface PalletLotteryLotteryConfig extends Struct {
    readonly price: u128;
    readonly start: u32;
    readonly length: u32;
    readonly delay: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 13 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 17..23
packages/types-augment/src/lookup/types-substrate.ts on lines 5010..5016
packages/types-augment/src/lookup/types-substrate.ts on lines 7208..7214
packages/types-augment/src/lookup/types-substrate.ts on lines 7476..7482
packages/types-augment/src/lookup/types-substrate.ts on lines 7667..7673
packages/types-augment/src/lookup/types-substrate.ts on lines 8048..8054
packages/types-augment/src/lookup/types-substrate.ts on lines 8129..8135
packages/types-augment/src/lookup/types-substrate.ts on lines 8363..8369
packages/types-augment/src/lookup/types-substrate.ts on lines 8488..8494
packages/types-augment/src/lookup/types-substrate.ts on lines 8657..8663
packages/types-augment/src/lookup/types-substrate.ts on lines 8738..8744
packages/types-augment/src/lookup/types-substrate.ts on lines 8764..8770
packages/types-augment/src/lookup/types-substrate.ts on lines 9015..9021

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

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

    readonly type: 'Propose' | 'Vote' | 'InitMembers' | 'Disband' | 'SetRule' | 'Announce' | 'RemoveAnnouncement' | 'JoinAlliance' | 'NominateAlly' | 'ElevateAlly' | 'GiveRetirementNotice' | 'Retire' | 'KickMember' | 'AddUnscrupulousItems' | 'RemoveUnscrupulousItems' | 'Close' | 'AbdicateFellowStatus';
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 646..646
packages/types-augment/src/lookup/types-substrate.ts on lines 1081..1081
packages/types-augment/src/lookup/types-substrate.ts on lines 1163..1163
packages/types-augment/src/lookup/types-substrate.ts on lines 7338..7338

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

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