polkadot-js/api

View on GitHub
packages/types/src/interfaces/eth/types.ts

Summary

Maintainability
F
6 days
Test Coverage

File types.ts has 348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

import type { GenericEthereumAccountId, GenericEthereumLookupSource } from '@polkadot/types';
import type { Bytes, Enum, Option, Struct, U256, U64, U8aFixed, Vec, bool, f64, u32, u64 } from '@polkadot/types-codec';
Severity: Minor
Found in packages/types/src/interfaces/eth/types.ts - About 4 hrs to fix

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

    export interface EthHeader extends Struct {
      readonly parentHash: H256;
      readonly ommersHash: H256;
      readonly beneficiary: EthAddress;
      readonly stateRoot: H256;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 1 other location - About 5 hrs to fix
    packages/types/src/interfaces/contracts/types.ts on lines 471..487

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

    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 EIP1559Transaction extends Struct {
      readonly chainId: u64;
      readonly nonce: U256;
      readonly maxPriorityFeePerGas: U256;
      readonly maxFeePerGas: U256;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 1 other location - About 4 hrs to fix
    packages/types/src/interfaces/assets/types.ts on lines 34..47

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

    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 EthTransactionRequest extends Struct {
      readonly from: Option<EthAddress>;
      readonly to: Option<EthAddress>;
      readonly gasPrice: Option<U256>;
      readonly gas: Option<U256>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 1 other location - About 4 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 94..102

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

    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 EthCallRequest extends Struct {
      readonly from: Option<EthAddress>;
      readonly to: Option<EthAddress>;
      readonly gasPrice: Option<U256>;
      readonly gas: Option<U256>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 1 other location - About 4 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 376..384

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

    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

    export interface EthSubResult extends Enum {
      readonly isHeader: boolean;
      readonly asHeader: EthRichHeader;
      readonly isLog: boolean;
      readonly asLog: EthLog;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 2 other locations - About 3 hrs to fix
    packages/types/src/interfaces/babe/types.ts on lines 116..126
    packages/types/src/interfaces/evm/types.ts on lines 100..110

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

    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 LegacyTransaction extends Struct {
      readonly nonce: U256;
      readonly gasPrice: U256;
      readonly gasLimit: U256;
      readonly action: EthTransactionAction;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/parachains/types.ts on lines 12..20

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 80.

    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

    export interface EthFilterAddress extends Enum {
      readonly isSingle: boolean;
      readonly asSingle: EthAddress;
      readonly isMultiple: boolean;
      readonly asMultiple: Vec<EthAddress>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 154..161
    packages/types/src/interfaces/eth/types.ts on lines 167..174

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

    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

    export interface EthFilterTopicInner extends Enum {
      readonly isSingle: boolean;
      readonly asSingle: EthFilterTopicEntry;
      readonly isMultiple: boolean;
      readonly asMultiple: Vec<EthFilterTopicEntry>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 134..141
    packages/types/src/interfaces/eth/types.ts on lines 154..161

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

    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

    export interface EthFilterTopic extends Enum {
      readonly isSingle: boolean;
      readonly asSingle: EthFilterTopicInner;
      readonly isMultiple: boolean;
      readonly asMultiple: Vec<EthFilterTopicInner>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 2 other locations - About 2 hrs to fix
    packages/types/src/interfaces/eth/types.ts on lines 134..141
    packages/types/src/interfaces/eth/types.ts on lines 167..174

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

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

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

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

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

    Refactorings

    Further Reading

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

    export interface EthSyncInfo extends Struct {
      readonly startingBlock: U256;
      readonly currentBlock: U256;
      readonly highestBlock: U256;
      readonly warpChunksAmount: Option<U256>;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 5 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 17..23
    packages/types/src/interfaces/contractsAbi/types.ts on lines 37..43
    packages/types/src/interfaces/evm/types.ts on lines 22..28
    packages/types/src/interfaces/evm/types.ts on lines 39..45
    packages/types/src/interfaces/runtime/types.ts on lines 359..365

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

    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

    export interface EthSubKind extends Enum {
      readonly isNewHeads: boolean;
      readonly isLogs: boolean;
      readonly isNewPendingTransactions: boolean;
      readonly isSyncing: boolean;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 4 other locations - About 1 hr to fix
    packages/types/src/interfaces/mixnet/types.ts on lines 24..30
    packages/types/src/interfaces/staking/types.ts on lines 169..175
    packages/types/src/interfaces/xcm/types.ts on lines 463..469
    packages/types/src/interfaces/xcm/types.ts on lines 901..907

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

    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

    export interface EthTransactionCondition extends Enum {
      readonly isBlock: boolean;
      readonly asBlock: u64;
      readonly isTime: boolean;
      readonly asTime: u64;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 18 other locations - About 1 hr to fix
    packages/types/src/interfaces/author/types.ts on lines 8..14
    packages/types/src/interfaces/babe/types.ts on lines 167..173
    packages/types/src/interfaces/contracts/types.ts on lines 25..31
    packages/types/src/interfaces/contracts/types.ts on lines 141..147
    packages/types/src/interfaces/contracts/types.ts on lines 522..528
    packages/types/src/interfaces/democracy/types.ts on lines 10..16
    packages/types/src/interfaces/democracy/types.ts on lines 49..55
    packages/types/src/interfaces/democracy/types.ts on lines 76..82
    packages/types/src/interfaces/democracy/types.ts on lines 88..94
    packages/types/src/interfaces/democracy/types.ts on lines 127..133
    packages/types/src/interfaces/eth/types.ts on lines 427..433
    packages/types/src/interfaces/grandpa/types.ts on lines 74..80
    packages/types/src/interfaces/parachains/types.ts on lines 103..109
    packages/types/src/interfaces/parachains/types.ts on lines 270..276
    packages/types/src/interfaces/state/types.ts on lines 111..117
    packages/types/src/interfaces/system/types.ts on lines 451..457
    packages/types/src/interfaces/xcm/types.ts on lines 352..358
    packages/types/src/interfaces/xcm/types.ts on lines 666..672

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

    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

    export interface TransactionV1 extends Enum {
      readonly isLegacy: boolean;
      readonly asLegacy: LegacyTransaction;
      readonly isEip2930: boolean;
      readonly asEip2930: EIP2930Transaction;
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 18 other locations - About 1 hr to fix
    packages/types/src/interfaces/author/types.ts on lines 8..14
    packages/types/src/interfaces/babe/types.ts on lines 167..173
    packages/types/src/interfaces/contracts/types.ts on lines 25..31
    packages/types/src/interfaces/contracts/types.ts on lines 141..147
    packages/types/src/interfaces/contracts/types.ts on lines 522..528
    packages/types/src/interfaces/democracy/types.ts on lines 10..16
    packages/types/src/interfaces/democracy/types.ts on lines 49..55
    packages/types/src/interfaces/democracy/types.ts on lines 76..82
    packages/types/src/interfaces/democracy/types.ts on lines 88..94
    packages/types/src/interfaces/democracy/types.ts on lines 127..133
    packages/types/src/interfaces/eth/types.ts on lines 367..373
    packages/types/src/interfaces/grandpa/types.ts on lines 74..80
    packages/types/src/interfaces/parachains/types.ts on lines 103..109
    packages/types/src/interfaces/parachains/types.ts on lines 270..276
    packages/types/src/interfaces/state/types.ts on lines 111..117
    packages/types/src/interfaces/system/types.ts on lines 451..457
    packages/types/src/interfaces/xcm/types.ts on lines 352..358
    packages/types/src/interfaces/xcm/types.ts on lines 666..672

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

    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

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

    export interface BlockV2 extends Struct {
      readonly header: EthHeader;
      readonly transactions: Vec<TransactionV2>;
      readonly ommers: Vec<EthHeader>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

    export interface BlockV1 extends Struct {
      readonly header: EthHeader;
      readonly transactions: Vec<TransactionV1>;
      readonly ommers: Vec<EthHeader>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

    export interface EthBlock extends Struct {
      readonly header: EthHeader;
      readonly transactions: Vec<EthTransaction>;
      readonly ommers: Vec<EthHeader>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 9..13
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

    export interface BlockV0 extends Struct {
      readonly header: EthHeader;
      readonly transactions: Vec<TransactionV0>;
      readonly ommers: Vec<EthHeader>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 11 other locations - About 1 hr to fix
    packages/types/src/interfaces/attestations/types.ts on lines 10..14
    packages/types/src/interfaces/contractsAbi/types.ts on lines 153..157
    packages/types/src/interfaces/contractsAbi/types.ts on lines 160..164
    packages/types/src/interfaces/contractsAbi/types.ts on lines 167..171
    packages/types/src/interfaces/elections/types.ts on lines 12..16
    packages/types/src/interfaces/eth/types.ts on lines 16..20
    packages/types/src/interfaces/eth/types.ts on lines 23..27
    packages/types/src/interfaces/eth/types.ts on lines 84..88
    packages/types/src/interfaces/metadata/types.ts on lines 74..78
    packages/types/src/interfaces/metadata/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 405..409

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

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

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

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

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

    Refactorings

    Further Reading

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

    export interface EthSyncStatus extends Enum {
      readonly isInfo: boolean;
      readonly asInfo: EthSyncInfo;
      readonly isNone: boolean;
      readonly type: 'Info' | 'None';
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 5 other locations - About 55 mins to fix
    packages/types/src/interfaces/contracts/types.ts on lines 109..114
    packages/types/src/interfaces/contracts/types.ts on lines 117..122
    packages/types/src/interfaces/contracts/types.ts on lines 454..459
    packages/types/src/interfaces/eth/types.ts on lines 359..364
    packages/types/src/interfaces/parachains/types.ts on lines 222..227

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

    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

    export interface EthSubParams extends Enum {
      readonly isNone: boolean;
      readonly isLogs: boolean;
      readonly asLogs: EthFilter;
      readonly type: 'None' | 'Logs';
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 6 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 84..89
    packages/types/src/interfaces/beefy/types.ts on lines 61..66
    packages/types/src/interfaces/genericAsset/types.ts on lines 14..19
    packages/types/src/interfaces/grandpa/types.ts on lines 37..42
    packages/types/src/interfaces/parachains/types.ts on lines 735..740
    packages/types/src/interfaces/staking/types.ts on lines 130..135

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

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

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

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

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

    Refactorings

    Further Reading

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

    export interface EthTransactionAction extends Enum {
      readonly isCall: boolean;
      readonly asCall: H160;
      readonly isCreate: boolean;
      readonly type: 'Call' | 'Create';
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 5 other locations - About 55 mins to fix
    packages/types/src/interfaces/contracts/types.ts on lines 109..114
    packages/types/src/interfaces/contracts/types.ts on lines 117..122
    packages/types/src/interfaces/contracts/types.ts on lines 454..459
    packages/types/src/interfaces/eth/types.ts on lines 324..329
    packages/types/src/interfaces/parachains/types.ts on lines 222..227

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

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

    export interface EthStorageProof extends Struct {
      readonly key: U256;
      readonly value: U256;
      readonly proof: Vec<Bytes>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/eth/types.ts and 16 other locations - About 45 mins to fix
    packages/types/src/interfaces/benchmark/types.ts on lines 25..29
    packages/types/src/interfaces/contracts/types.ts on lines 34..38
    packages/types/src/interfaces/contracts/types.ts on lines 356..360
    packages/types/src/interfaces/grandpa/types.ts on lines 67..71
    packages/types/src/interfaces/grandpa/types.ts on lines 97..101
    packages/types/src/interfaces/grandpa/types.ts on lines 165..169
    packages/types/src/interfaces/metadata/types.ts on lines 96..100
    packages/types/src/interfaces/metadata/types.ts on lines 128..132
    packages/types/src/interfaces/parachains/types.ts on lines 490..494
    packages/types/src/interfaces/parachains/types.ts on lines 930..934
    packages/types/src/interfaces/recovery/types.ts on lines 8..12
    packages/types/src/interfaces/staking/types.ts on lines 295..299
    packages/types/src/interfaces/state/types.ts on lines 23..27
    packages/types/src/interfaces/state/types.ts on lines 74..78
    packages/types/src/interfaces/system/types.ts on lines 258..262
    packages/types/src/interfaces/system/types.ts on lines 420..424

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

    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

    There are no issues that match your filters.

    Category
    Status