polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  interface StagingXcmV4QueryResponseInfo extends Struct {
    readonly destination: StagingXcmV4Location;
    readonly queryId: Compact<u64>;
    readonly maxWeight: SpWeightsWeightV2Weight;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletNftsCollectionConfig extends Struct {
    readonly settings: u64;
    readonly maxSupply: Option<u32>;
    readonly mintSettings: PalletNftsMintSettings;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

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

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

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

Refactorings

Further Reading

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

  interface SpSessionMembershipProof extends Struct {
    readonly session: u32;
    readonly trieNodes: Vec<Bytes>;
    readonly validatorCount: u32;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

  interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
    readonly manager: AccountId32;
    readonly deposit: u128;
    readonly locked: Option<bool>;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 4 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 66..70
packages/types-augment/src/lookup/types-substrate.ts on lines 5938..5942
packages/types-augment/src/lookup/types-substrate.ts on lines 7740..7744
packages/types-augment/src/lookup/types-substrate.ts on lines 9078..9082

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

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

export interface UnlockChunk extends Struct {
  readonly value: Compact<Balance>;
  readonly era: Compact<BlockNumber>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/parachains/types.ts on lines 635..638
packages/types/src/interfaces/staking/types.ts on lines 124..127
packages/types/src/interfaces/staking/types.ts on lines 309..312
packages/types/src/interfaces/staking/types.ts on lines 392..395

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

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

  interface FrameSystemEventRecord extends Struct {
    readonly phase: FrameSystemPhase;
    readonly event: Event;
    readonly topics: Vec<H256>;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3181..3185
packages/types-augment/src/lookup/types-substrate.ts on lines 5938..5942
packages/types-augment/src/lookup/types-substrate.ts on lines 7740..7744
packages/types-augment/src/lookup/types-substrate.ts on lines 9078..9082

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

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

  interface PalletMixnetBoundedMixnode extends Struct {
    readonly kxPublic: U8aFixed;
    readonly peerId: U8aFixed;
    readonly externalAddresses: Vec<Bytes>;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3181..3185
packages/types-augment/src/lookup/types-substrate.ts on lines 66..70
packages/types-augment/src/lookup/types-substrate.ts on lines 7740..7744
packages/types-augment/src/lookup/types-substrate.ts on lines 9078..9082

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

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

export interface ParaPastCodeMeta extends Struct {
  readonly upgradeTimes: Vec<ReplacementTimes>;
  readonly lastPruned: Option<BlockNumber>;
}
Severity: Major
Found in packages/types/src/interfaces/parachains/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/staking/types.ts on lines 124..127
packages/types/src/interfaces/staking/types.ts on lines 309..312
packages/types/src/interfaces/staking/types.ts on lines 377..380
packages/types/src/interfaces/staking/types.ts on lines 392..395

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV6BackedCandidate extends Struct {
    readonly candidate: PolkadotPrimitivesV6CommittedCandidateReceipt;
    readonly validityVotes: Vec<PolkadotPrimitivesV6ValidityAttestation>;
    readonly validatorIndices: BitVec;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

  interface PalletRecoveryActiveRecovery extends Struct {
    readonly created: u32;
    readonly deposit: u128;
    readonly friends: Vec<AccountId32>;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3181..3185
packages/types-augment/src/lookup/types-substrate.ts on lines 66..70
packages/types-augment/src/lookup/types-substrate.ts on lines 5938..5942
packages/types-augment/src/lookup/types-substrate.ts on lines 9078..9082

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotPrimitivesV7BackedCandidate extends Struct {
    readonly candidate: PolkadotPrimitivesV7CommittedCandidateReceipt;
    readonly validityVotes: Vec<PolkadotPrimitivesV7ValidityAttestation>;
    readonly validatorIndices: BitVec;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletMigrationsActiveCursor extends Struct {
    readonly index: u32;
    readonly innerCursor: Option<Bytes>;
    readonly startedAt: u32;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 1921..1925
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743

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

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

export interface SolutionOrSnapshotSize extends Struct {
  readonly voters: Compact<u32>;
  readonly targets: Compact<u32>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/parachains/types.ts on lines 635..638
packages/types/src/interfaces/staking/types.ts on lines 124..127
packages/types/src/interfaces/staking/types.ts on lines 377..380
packages/types/src/interfaces/staking/types.ts on lines 392..395

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

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

export interface ElectionSize extends Struct {
  readonly validators: Compact<ValidatorIndex>;
  readonly nominators: Compact<NominatorIndex>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/parachains/types.ts on lines 635..638
packages/types/src/interfaces/staking/types.ts on lines 309..312
packages/types/src/interfaces/staking/types.ts on lines 377..380
packages/types/src/interfaces/staking/types.ts on lines 392..395

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

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

export interface ValidatorPrefsTo145 extends Struct {
  readonly unstakeThreshold: Compact<u32>;
  readonly validatorPayment: Compact<Balance>;
}
Severity: Major
Found in packages/types/src/interfaces/staking/types.ts and 5 other locations - About 35 mins to fix
packages/types/src/interfaces/grandpa/types.ts on lines 53..56
packages/types/src/interfaces/parachains/types.ts on lines 635..638
packages/types/src/interfaces/staking/types.ts on lines 124..127
packages/types/src/interfaces/staking/types.ts on lines 309..312
packages/types/src/interfaces/staking/types.ts on lines 377..380

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

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

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

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

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

Refactorings

Further Reading

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

  interface XcmV3QueryResponseInfo extends Struct {
    readonly destination: StagingXcmV3MultiLocation;
    readonly queryId: Compact<u64>;
    readonly maxWeight: SpWeightsWeightV2Weight;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 6 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 235..239
packages/types-augment/src/lookup/types-polkadot.ts on lines 844..848
packages/types-augment/src/lookup/types-polkadot.ts on lines 2216..2220
packages/types-augment/src/lookup/types-substrate.ts on lines 2607..2611
packages/types-augment/src/lookup/types-substrate.ts on lines 4739..4743
packages/types-augment/src/lookup/types-substrate.ts on lines 5745..5749

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

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

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

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

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

Refactorings

Further Reading

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

  AssetInstanceV2: {
    _enum: {
      Undefined: 'Null',
      Index: 'Compact<u128>',
      Array4: '[u8;4]',
Severity: Major
Found in packages/types/src/interfaces/xcm/v2.ts and 3 other locations - About 35 mins to fix
packages/types/src/interfaces/identity/definitions.ts on lines 49..59
packages/types/src/interfaces/xcm/definitions.ts on lines 44..54
packages/types/src/interfaces/xcm/v1.ts on lines 10..20

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

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

  interface PalletBrokerInstaPoolHistoryRecord extends Struct {
    readonly privateContributions: u32;
    readonly systemContributions: u32;
    readonly maybePayout: Option<u128>;
  }
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 35 mins to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3181..3185
packages/types-augment/src/lookup/types-substrate.ts on lines 66..70
packages/types-augment/src/lookup/types-substrate.ts on lines 5938..5942
packages/types-augment/src/lookup/types-substrate.ts on lines 7740..7744

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'NominationPools' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
Severity: Minor
Found in packages/api-augment/src/polkadot/tx.ts and 1 other location - About 35 mins to fix
packages/api-augment/src/polkadot/tx.ts on lines 1006..1006

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

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

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

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

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

Refactorings

Further Reading

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

  BodyId: {
    _enum: {
      Unit: 'Null',
      Named: 'Vec<u8>',
      Index: 'Compact<u32>',
Severity: Major
Found in packages/types/src/interfaces/xcm/definitions.ts and 3 other locations - About 35 mins to fix
packages/types/src/interfaces/identity/definitions.ts on lines 49..59
packages/types/src/interfaces/xcm/v1.ts on lines 10..20
packages/types/src/interfaces/xcm/v2.ts on lines 16..26

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

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