polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

  interface PalletNominationPoolsConfigOpPerbill extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: Perbill;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

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

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

  interface PalletStakingPalletConfigOpU128 extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: u128;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 2945..2951
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

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

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

  interface PalletStakingPalletConfigOpPerbill extends Enum {
    readonly isNoop: boolean;
    readonly isSet: boolean;
    readonly asSet: Perbill;
    readonly isRemove: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 9 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2546..2552
packages/types-augment/src/lookup/types-substrate.ts on lines 2918..2924
packages/types-augment/src/lookup/types-substrate.ts on lines 2927..2933
packages/types-augment/src/lookup/types-substrate.ts on lines 2936..2942
packages/types-augment/src/lookup/types-substrate.ts on lines 5019..5025
packages/types-augment/src/lookup/types-substrate.ts on lines 5490..5496
packages/types-augment/src/lookup/types-substrate.ts on lines 5499..5505
packages/types-augment/src/lookup/types-substrate.ts on lines 5508..5514
packages/types-augment/src/lookup/types-substrate.ts on lines 5517..5523

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

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 PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum {
    readonly isReportDisputeLostUnsigned: boolean;
    readonly asReportDisputeLostUnsigned: {
      readonly disputeProof: PolkadotPrimitivesV6SlashingDisputeProof;
      readonly keyOwnerProof: SpSessionMembershipProof;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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

  getKeys: {
    deprecated: 'Use `api.rpc.state.getKeysPaged` to retrieve keys',
    description: 'Retrieves the keys with a certain prefix',
    params: [
      {
Severity: Major
Found in packages/types/src/interfaces/state/rpc.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/contracts/rpc.ts on lines 7..23
packages/types/src/interfaces/contracts/rpc.ts on lines 45..61
packages/types/src/interfaces/contracts/rpc.ts on lines 62..78

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

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 PalletOffencesEvent extends Enum {
    readonly isOffence: boolean;
    readonly asOffence: {
      readonly kind: U8aFixed;
      readonly timeslot: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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 PalletAssetConversionOpsCall extends Enum {
    readonly isMigrateToNewAccount: boolean;
    readonly asMigrateToNewAccount: {
      readonly asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId;
      readonly asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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 PalletMixnetCall extends Enum {
    readonly isRegister: boolean;
    readonly asRegister: {
      readonly registration: PalletMixnetRegistration;
      readonly signature: SpMixnetAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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 PalletStatementEvent extends Enum {
    readonly isNewStatement: boolean;
    readonly asNewStatement: {
      readonly account: AccountId32;
      readonly statement: SpStatementStoreStatement;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006

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

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

        expect(extrinsic.method.toHuman()).toEqual({ args: { dest: { Id: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY' }, value: '10,000,000,000' }, method: 'transferAllowDeath', section: 'balances' });
Severity: Major
Found in packages/types/src/extrinsic/Extrinsic.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/extrinsic/Extrinsic.spec.ts on lines 103..103

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

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

  rentProjection: {
    deprecated: 'Not available in newer versions of the contracts interfaces',
    description: 'Returns the projected time a given contract will be able to sustain paying its rent',
    params: [
      {
Severity: Major
Found in packages/types/src/interfaces/contracts/rpc.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/contracts/rpc.ts on lines 7..23
packages/types/src/interfaces/contracts/rpc.ts on lines 45..61
packages/types/src/interfaces/state/rpc.ts on lines 160..176

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

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

  instantiate: {
    deprecated: 'Use the runtime interface `api.call.contractsApi.instantiate` instead',
    description: 'Instantiate a new contract',
    params: [
      {
Severity: Major
Found in packages/types/src/interfaces/contracts/rpc.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/contracts/rpc.ts on lines 7..23
packages/types/src/interfaces/contracts/rpc.ts on lines 62..78
packages/types/src/interfaces/state/rpc.ts on lines 160..176

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

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 PalletImOnlineCall extends Enum {
    readonly isHeartbeat: boolean;
    readonly asHeartbeat: {
      readonly heartbeat: PalletImOnlineHeartbeat;
      readonly signature: PalletImOnlineSr25519AppSr25519Signature;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 5999..6006
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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

  call: {
    deprecated: 'Use the runtime interface `api.call.contractsApi.call` instead',
    description: 'Executes a call to a contract',
    params: [
      {
Severity: Major
Found in packages/types/src/interfaces/contracts/rpc.ts and 3 other locations - About 1 hr to fix
packages/types/src/interfaces/contracts/rpc.ts on lines 45..61
packages/types/src/interfaces/contracts/rpc.ts on lines 62..78
packages/types/src/interfaces/state/rpc.ts on lines 160..176

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

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

    readonly asSpend: {
      readonly assetKind: u32;
      readonly amount: Compact<u128>;
      readonly beneficiary: MultiAddress;
      readonly validFrom: Option<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3115..3120
packages/types-augment/src/lookup/types-substrate.ts on lines 5295..5300

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

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 PalletRemarkEvent extends Enum {
    readonly isStored: boolean;
    readonly asStored: {
      readonly sender: AccountId32;
      readonly contentHash: H256;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 6 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1072..1079
packages/types-augment/src/lookup/types-substrate.ts on lines 986..993
packages/types-augment/src/lookup/types-substrate.ts on lines 3420..3427
packages/types-augment/src/lookup/types-substrate.ts on lines 5920..5927
packages/types-augment/src/lookup/types-substrate.ts on lines 5979..5986
packages/types-augment/src/lookup/types-substrate.ts on lines 6447..6454

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

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

        expect(extrinsic.method.toHuman()).toEqual({ args: { dest: { Id: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY' }, value: '10,000,000,000' }, method: 'transferAllowDeath', section: 'balances' });
Severity: Major
Found in packages/types/src/extrinsic/Extrinsic.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/extrinsic/Extrinsic.spec.ts on lines 119..119

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

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

    readonly asTransferred: {
      readonly regionId: PalletBrokerRegionId;
      readonly duration: u32;
      readonly oldOwner: Option<AccountId32>;
      readonly owner: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 4482..4487
packages/types-augment/src/lookup/types-substrate.ts on lines 4685..4690

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

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

    readonly asClose: {
      readonly proposalHash: H256;
      readonly index: Compact<u32>;
      readonly proposalWeightBound: SpWeightsWeightV2Weight;
      readonly lengthBound: Compact<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3115..3120
packages/types-augment/src/lookup/types-substrate.ts on lines 3272..3277

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

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

    readonly asSetPrice: {
      readonly collection: u32;
      readonly item: u32;
      readonly price: Option<u128>;
      readonly whitelistedBuyer: Option<MultiAddress>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 4685..4690
packages/types-augment/src/lookup/types-substrate.ts on lines 6554..6559

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

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