polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  interface SpConsensusGrandpaEquivocation extends Enum {
    readonly isPrevote: boolean;
    readonly asPrevote: FinalityGrandpaEquivocationPrevote;
    readonly isPrecommit: boolean;
    readonly asPrecommit: FinalityGrandpaEquivocationPrecommit;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletConvictionVotingVoteVoting extends Enum {
    readonly isCasting: boolean;
    readonly asCasting: PalletConvictionVotingVoteCasting;
    readonly isDelegating: boolean;
    readonly asDelegating: PalletConvictionVotingVoteDelegating;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731

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

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

  interface StagingKusamaRuntimeRuntimeHoldReason extends Enum {
    readonly isPreimage: boolean;
    readonly asPreimage: PalletPreimageHoldReason;
    readonly isNis: boolean;
    readonly asNis: PalletNisHoldReason;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface XcmV3MultiassetAssetId extends Enum {
    readonly isConcrete: boolean;
    readonly asConcrete: StagingXcmV3MultiLocation;
    readonly isAbstract: boolean;
    readonly asAbstract: U8aFixed;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletXcmOrigin extends Enum {
    readonly isXcm: boolean;
    readonly asXcm: StagingXcmV4Location;
    readonly isResponse: boolean;
    readonly asResponse: StagingXcmV4Location;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

export interface CollectiveOrigin extends Enum {
  readonly isMembers: boolean;
  readonly asMembers: ITuple<[MemberCount, MemberCount]>;
  readonly isMember: boolean;
  readonly asMember: AccountId;
Severity: Major
Found in packages/types/src/interfaces/collective/types.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 6015..6021

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

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

      getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;
Severity: Major
Found in packages/rpc-augment/src/augment/jsonrpc.ts and 1 other location - About 1 hr to fix
packages/rpc-augment/src/augment/jsonrpc.ts on lines 270..270

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

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

  interface PalletSocietyBidKind extends Enum {
    readonly isDeposit: boolean;
    readonly asDeposit: u128;
    readonly isVouch: boolean;
    readonly asVouch: ITuple<[AccountId32, u128]>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/society/types.ts on lines 16..22

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

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

export interface BidKind extends Enum {
  readonly isDeposit: boolean;
  readonly asDeposit: Balance;
  readonly isVouch: boolean;
  readonly asVouch: ITuple<[AccountId, Balance]>;
Severity: Major
Found in packages/types/src/interfaces/society/types.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7658..7664

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

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

      getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
Severity: Major
Found in packages/rpc-augment/src/augment/jsonrpc.ts and 1 other location - About 1 hr to fix
packages/rpc-augment/src/augment/jsonrpc.ts on lines 290..290

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

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

  interface PalletConvictionVotingEvent extends Enum {
    readonly isDelegated: boolean;
    readonly asDelegated: ITuple<[AccountId32, AccountId32]>;
    readonly isUndelegated: boolean;
    readonly asUndelegated: AccountId32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/collective/types.ts on lines 9..15

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

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

    it('has a sane inspect', (): void => {
      expect(
        new Int(registry, '0x12', 16).inspect()
      ).toEqual({
        outer: [new Uint8Array([0x12, 0x00])]
Severity: Major
Found in packages/types-codec/src/base/Int.spec.ts and 1 other location - About 1 hr to fix
packages/types-codec/src/base/UInt.spec.ts on lines 132..138

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

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

    it('has a sane inspect', (): void => {
      expect(
        new UInt(registry, '0x12', 16).inspect()
      ).toEqual({
        outer: [new Uint8Array([0x12, 0x00])]
Severity: Major
Found in packages/types-codec/src/base/UInt.spec.ts and 1 other location - About 1 hr to fix
packages/types-codec/src/base/Int.spec.ts on lines 186..192

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

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 PalletChildBountiesChildBounty extends Struct {
    readonly parentBounty: u32;
    readonly value: u128;
    readonly fee: u128;
    readonly curatorDeposit: u128;
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 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 PalletSocietyCandidacy extends Struct {
    readonly round: u32;
    readonly kind: PalletSocietyBidKind;
    readonly bid: u128;
    readonly tally: PalletSocietyTally;
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 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 PalletSalaryStatusType extends Struct {
    readonly cycleIndex: u32;
    readonly cycleStart: u32;
    readonly budget: u128;
    readonly totalRegistrations: u128;
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 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 PalletDemocracyReferendumStatus extends Struct {
    readonly end: u32;
    readonly proposal: FrameSupportPreimagesBounded;
    readonly threshold: PalletDemocracyVoteThreshold;
    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 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 PalletNominationPoolsRewardPool extends Struct {
    readonly lastRecordedRewardCounter: u128;
    readonly lastRecordedTotalPayouts: u128;
    readonly totalRewardsClaimed: u128;
    readonly totalCommissionPending: u128;
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 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 ContractEventParamSpecV2 extends Struct {
  readonly label: 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 134..139
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 EthWork extends Struct {
  readonly powHash: H256;
  readonly seedHash: H256;
  readonly target: H256;
  readonly number: Option<u64>;
Severity: Major
Found in packages/types/src/interfaces/eth/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/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

Severity
Category
Status
Source
Language