polkadot-js/api

View on GitHub

Showing 2,329 of 2,509 total issues

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

  SpVersionRuntimeVersion: {
    specName: 'Text',
    implName: 'Text',
    authoringVersion: 'u32',
    specVersion: 'u32',
Severity: Major
Found in packages/types-augment/src/lookup/substrate.ts and 3 other locations - About 40 mins to fix
packages/types-augment/src/lookup/polkadot.ts on lines 2987..2996
packages/types-augment/src/lookup/substrate.ts on lines 5464..5473
packages/types-augment/src/lookup/substrate.ts on lines 7013..7022

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

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

  PalletBrokerConfigRecord: {
    advanceNotice: 'u32',
    interludeLength: 'u32',
    leadinLength: 'u32',
    regionLength: 'u32',
Severity: Major
Found in packages/types-augment/src/lookup/substrate.ts and 3 other locations - About 40 mins to fix
packages/types-augment/src/lookup/polkadot.ts on lines 2987..2996
packages/types-augment/src/lookup/substrate.ts on lines 6365..6374
packages/types-augment/src/lookup/substrate.ts on lines 7013..7022

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

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

  PolkadotRuntimeParachainsHrmpHrmpChannel: {
    maxCapacity: 'u32',
    maxTotalSize: 'u32',
    maxMessageSize: 'u32',
    msgCount: 'u32',
Severity: Major
Found in packages/types-augment/src/lookup/polkadot.ts and 3 other locations - About 40 mins to fix
packages/types-augment/src/lookup/substrate.ts on lines 5464..5473
packages/types-augment/src/lookup/substrate.ts on lines 6365..6374
packages/types-augment/src/lookup/substrate.ts on lines 7013..7022

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

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

  PalletContractsStorageContractInfo: {
    trieId: 'Bytes',
    codeHash: 'H256',
    storageBytes: 'u32',
    storageItems: 'u32',
Severity: Major
Found in packages/types-augment/src/lookup/substrate.ts and 3 other locations - About 40 mins to fix
packages/types-augment/src/lookup/polkadot.ts on lines 2987..2996
packages/types-augment/src/lookup/substrate.ts on lines 5464..5473
packages/types-augment/src/lookup/substrate.ts on lines 6365..6374

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

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

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

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

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

Refactorings

Further Reading

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

    readonly asRetryCancelled: {
      readonly task: ITuple<[u32, u32]>;
      readonly id: Option<U8aFixed>;
    } & Struct;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 4 other locations - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1262..1265
packages/types-augment/src/lookup/types-substrate.ts on lines 1267..1270
packages/types-augment/src/lookup/types-substrate.ts on lines 1272..1275
packages/types-augment/src/lookup/types-substrate.ts on lines 1277..1280

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

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 class isize extends i32 {
  constructor (registry: Registry, value?: unknown) {
    super(registry, value);

    throw new Error('The `isize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally i64) and WASM (always i32) code. Use one of the `i32` or `i64` types explicitly.');
Severity: Minor
Found in packages/types-codec/src/primitive/ISize.ts and 1 other location - About 40 mins to fix
packages/types-codec/src/primitive/USize.ts on lines 15..21

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

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

    readonly asPoolCommissionUpdated: {
      readonly poolId: u32;
      readonly current: Option<ITuple<[Perbill, AccountId32]>>;
    } & Struct;
Severity: Minor
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 5383..5386

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

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 class usize extends u32 {
  constructor (registry: Registry, value?: unknown) {
    super(registry, value);

    throw new Error('The `usize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally u64) and WASM (always u32) code. Use one of the `u32` or `u64` types explicitly.');
Severity: Minor
Found in packages/types-codec/src/primitive/USize.ts and 1 other location - About 40 mins to fix
packages/types-codec/src/primitive/ISize.ts on lines 15..21

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

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 ResponseV0 extends Enum {
  readonly isAssets: boolean;
  readonly asAssets: Vec<MultiAssetV0>;
  readonly type: 'Assets';
}
Severity: Minor
Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 40 mins to fix
packages/types/src/interfaces/runtime/types.ts on lines 69..73

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

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

    readonly asSetCommission: {
      readonly poolId: u32;
      readonly newCommission: Option<ITuple<[Perbill, AccountId32]>>;
    } & Struct;
Severity: Minor
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 6126..6129

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

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 ChangesTrieSignal extends Enum {
  readonly isNewConfiguration: boolean;
  readonly asNewConfiguration: Option<ChangesTrieConfiguration>;
  readonly type: 'NewConfiguration';
}
Severity: Minor
Found in packages/types/src/interfaces/runtime/types.ts and 1 other location - About 40 mins to fix
packages/types/src/interfaces/xcm/types.ts on lines 527..531

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

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

        api.query.staking.erasStakersPaged
          ? combineLatest(eras.map((e) => api.query.staking.erasStakersPaged<Option<SpStakingExposurePage>>(e, accountId, page)))
          : of(eras.map((_) => emptyOptionPage)),
Severity: Minor
Found in packages/api-derive/src/staking/ownExposure.ts and 1 other location - About 40 mins to fix
packages/api-derive/src/staking/query.ts on lines 153..155

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

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

    withExposure && api.query.staking.erasStakersPaged
      ? combineLatest(stashIds.map((s) => api.query.staking.erasStakersPaged<Option<SpStakingExposurePage>>(activeEra, s, page)))
      : of(stashIds.map(() => emptyExpo)),
Severity: Minor
Found in packages/api-derive/src/staking/query.ts and 1 other location - About 40 mins to fix
packages/api-derive/src/staking/ownExposure.ts on lines 33..35

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

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    stateTrieMigration: {
      /**
       * Maximal number of bytes that a key can have.
       * 
       * FRAME itself does not limit the key length.
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    fastUnstake: {
      /**
       * Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
       * the costs of resources on unsuccessful unstake.
       **/
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    indices: {
      /**
       * The deposit needed for reserving an index.
       **/
      deposit: u128 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    utility: {
      /**
       * The limit on the number of batched calls.
       **/
      batchedCallsLimit: u32 & AugmentedConst<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1583..1612
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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

    transactionPayment: {
      /**
       * A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
       * `priority`
       * 
Severity: Major
Found in packages/api-augment/src/substrate/consts.ts and 23 other locations - About 35 mins to fix
packages/api-augment/src/kusama/consts.ts on lines 205..214
packages/api-augment/src/kusama/consts.ts on lines 310..320
packages/api-augment/src/kusama/consts.ts on lines 414..423
packages/api-augment/src/kusama/consts.ts on lines 599..608
packages/api-augment/src/kusama/consts.ts on lines 890..919
packages/api-augment/src/kusama/consts.ts on lines 954..968
packages/api-augment/src/kusama/consts.ts on lines 969..998
packages/api-augment/src/kusama/consts.ts on lines 1040..1049
packages/api-augment/src/polkadot/consts.ts on lines 300..310
packages/api-augment/src/polkadot/consts.ts on lines 375..384
packages/api-augment/src/polkadot/consts.ts on lines 698..712
packages/api-augment/src/polkadot/consts.ts on lines 713..742
packages/api-augment/src/polkadot/consts.ts on lines 784..793
packages/api-augment/src/substrate/consts.ts on lines 44..53
packages/api-augment/src/substrate/consts.ts on lines 413..422
packages/api-augment/src/substrate/consts.ts on lines 620..630
packages/api-augment/src/substrate/consts.ts on lines 695..707
packages/api-augment/src/substrate/consts.ts on lines 708..717
packages/api-augment/src/substrate/consts.ts on lines 1462..1491
packages/api-augment/src/substrate/consts.ts on lines 1526..1535
packages/api-augment/src/substrate/consts.ts on lines 1536..1550
packages/api-augment/src/substrate/consts.ts on lines 1654..1665
packages/api-augment/src/substrate/consts.ts on lines 1705..1714

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