polkadot-js/api

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

Summary

Maintainability
F
5 days
Test Coverage

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

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

import type { BTreeMap, Bytes, Enum, Option, Raw, Struct, Text, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
Severity: Minor
Found in packages/types/src/interfaces/contractsAbi/types.ts - About 3 hrs to fix

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

    export interface ContractMessageSpecV2 extends Struct {
      readonly label: Text;
      readonly selector: ContractSelector;
      readonly mutates: bool;
      readonly payable: bool;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 3 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 249..257

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

    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 ContractMessageSpecV0 extends Struct {
      readonly name: Text;
      readonly selector: ContractSelector;
      readonly mutates: bool;
      readonly payable: bool;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 3 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 271..279

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

    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 ContractContractSpecV4 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV4>;
      readonly messages: Vec<ContractMessageSpecV3>;
      readonly events: Vec<ContractEventSpecV2>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 98..104

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

    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 ContractContractSpecV5 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV4>;
      readonly messages: Vec<ContractMessageSpecV3>;
      readonly events: Vec<ContractEventSpecV3>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 89..95

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

    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 ContractContractSpecV1 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV1>;
      readonly messages: Vec<ContractMessageSpecV1>;
      readonly events: Vec<ContractEventSpecV1>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 4 other locations - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 57..62
    packages/types/src/interfaces/contractsAbi/types.ts on lines 73..78
    packages/types/src/interfaces/contractsAbi/types.ts on lines 81..86
    packages/types/src/interfaces/evm/types.ts on lines 61..66

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

    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 ContractContractSpecV2 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV2>;
      readonly messages: Vec<ContractMessageSpecV2>;
      readonly events: Vec<ContractEventSpecV2>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 4 other locations - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 57..62
    packages/types/src/interfaces/contractsAbi/types.ts on lines 65..70
    packages/types/src/interfaces/contractsAbi/types.ts on lines 81..86
    packages/types/src/interfaces/evm/types.ts on lines 61..66

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

    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 ContractContractSpecV3 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV3>;
      readonly messages: Vec<ContractMessageSpecV2>;
      readonly events: Vec<ContractEventSpecV2>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 4 other locations - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 57..62
    packages/types/src/interfaces/contractsAbi/types.ts on lines 65..70
    packages/types/src/interfaces/contractsAbi/types.ts on lines 73..78
    packages/types/src/interfaces/evm/types.ts on lines 61..66

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

    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 ContractContractSpecV0 extends Struct {
      readonly constructors: Vec<ContractConstructorSpecV0>;
      readonly messages: Vec<ContractMessageSpecV0>;
      readonly events: Vec<ContractEventSpecV0>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 4 other locations - About 2 hrs to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 65..70
    packages/types/src/interfaces/contractsAbi/types.ts on lines 73..78
    packages/types/src/interfaces/contractsAbi/types.ts on lines 81..86
    packages/types/src/interfaces/evm/types.ts on lines 61..66

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

    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 ContractConstructorSpecV3 extends Struct {
      readonly label: Text;
      readonly selector: ContractSelector;
      readonly payable: bool;
      readonly args: Vec<ContractMessageParamSpecV2>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/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/eth/types.ts on lines 315..321
    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 3 locations. Consider refactoring.
    Open

    export interface ContractConstructorSpecV1 extends Struct {
      readonly name: Vec<Text>;
      readonly selector: ContractSelector;
      readonly args: Vec<ContractMessageParamSpecV0>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/scaleInfo/types.ts on lines 7..12
    packages/types/src/interfaces/scaleInfo/types.ts on lines 124..129

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

    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 ContractProjectV0 extends Struct {
      readonly metadataVersion: Text;
      readonly source: ContractProjectSource;
      readonly contract: ContractProjectContract;
      readonly types: Vec<Si0Type>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 2 other locations - About 1 hr to fix
    packages/types/src/interfaces/grandpa/types.ts on lines 19..25
    packages/types/src/interfaces/parachains/types.ts on lines 887..893

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

    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 ContractConstructorSpecV2 extends Struct {
      readonly label: Text;
      readonly selector: ContractSelector;
      readonly args: Vec<ContractMessageParamSpecV2>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 1 hr to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 13..18

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

    export interface ContractConstructorSpecV0 extends Struct {
      readonly name: Text;
      readonly selector: ContractSelector;
      readonly args: Vec<ContractMessageParamSpecV0>;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 1 other location - About 1 hr to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 29..34

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

    export interface ContractEventParamSpecV2 extends Struct {
      readonly label: Text;
      readonly indexed: bool;
      readonly type: ContractTypeSpec;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 12 other locations - About 1 hr to fix
    packages/types/src/interfaces/beefy/types.ts on lines 25..30
    packages/types/src/interfaces/benchmark/types.ts on lines 8..13
    packages/types/src/interfaces/contractsAbi/types.ts on lines 134..139
    packages/types/src/interfaces/eth/types.ts on lines 405..410
    packages/types/src/interfaces/evm/types.ts on lines 14..19
    packages/types/src/interfaces/evm/types.ts on lines 31..36
    packages/types/src/interfaces/grandpa/types.ts on lines 59..64
    packages/types/src/interfaces/metadata/types.ts on lines 253..258
    packages/types/src/interfaces/metadata/types.ts on lines 334..339
    packages/types/src/interfaces/parachains/types.ts on lines 262..267
    packages/types/src/interfaces/staking/types.ts on lines 287..292
    packages/types/src/interfaces/utility/types.ts on lines 8..13

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface ContractEventParamSpecV0 extends Struct {
      readonly name: Text;
      readonly indexed: bool;
      readonly type: ContractTypeSpec;
      readonly docs: Vec<Text>;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 12 other locations - About 1 hr to fix
    packages/types/src/interfaces/beefy/types.ts on lines 25..30
    packages/types/src/interfaces/benchmark/types.ts on lines 8..13
    packages/types/src/interfaces/contractsAbi/types.ts on lines 142..147
    packages/types/src/interfaces/eth/types.ts on lines 405..410
    packages/types/src/interfaces/evm/types.ts on lines 14..19
    packages/types/src/interfaces/evm/types.ts on lines 31..36
    packages/types/src/interfaces/grandpa/types.ts on lines 59..64
    packages/types/src/interfaces/metadata/types.ts on lines 253..258
    packages/types/src/interfaces/metadata/types.ts on lines 334..339
    packages/types/src/interfaces/parachains/types.ts on lines 262..267
    packages/types/src/interfaces/staking/types.ts on lines 287..292
    packages/types/src/interfaces/utility/types.ts on lines 8..13

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 59.

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

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

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

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

    Refactorings

    Further Reading

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

    export interface ContractEventSpecV0 extends Struct {
      readonly name: Text;
      readonly args: Vec<ContractEventParamSpecV0>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/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 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/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 ContractEventSpecV2 extends Struct {
      readonly label: Text;
      readonly args: Vec<ContractEventParamSpecV2>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/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/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/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 ContractEventSpecV1 extends Struct {
      readonly name: Text;
      readonly args: Vec<ContractEventParamSpecV0>;
      readonly docs: Vec<Text>;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/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 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/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 16 locations. Consider refactoring.
    Open

    export interface ContractCryptoHasher extends Enum {
      readonly isBlake2x256: boolean;
      readonly isSha2x256: boolean;
      readonly isKeccak256: boolean;
      readonly type: 'Blake2x256' | 'Sha2x256' | 'Keccak256';
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 15 other locations - About 1 hr to fix
    packages/types/src/interfaces/babe/types.ts on lines 10..15
    packages/types/src/interfaces/balances/types.ts on lines 38..43
    packages/types/src/interfaces/bridges/types.ts on lines 102..107
    packages/types/src/interfaces/metadata/types.ts on lines 505..510
    packages/types/src/interfaces/parachains/types.ts on lines 539..544
    packages/types/src/interfaces/parachains/types.ts on lines 573..578
    packages/types/src/interfaces/society/types.ts on lines 25..30
    packages/types/src/interfaces/society/types.ts on lines 33..38
    packages/types/src/interfaces/staking/types.ts on lines 95..100
    packages/types/src/interfaces/statement/types.ts on lines 7..12
    packages/types/src/interfaces/statement/types.ts on lines 15..20
    packages/types/src/interfaces/system/types.ts on lines 64..69
    packages/types/src/interfaces/system/types.ts on lines 103..108
    packages/types/src/interfaces/txqueue/types.ts on lines 9..14
    packages/types/src/interfaces/xcm/types.ts on lines 910..915

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

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

    export interface ContractProjectSource extends Struct {
      readonly wasmHash: U8aFixed;
      readonly language: Text;
      readonly compiler: Text;
      readonly wasm: Raw;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 183..188
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 211..216
    packages/types/src/interfaces/parachains/types.ts on lines 247..252
    packages/types/src/interfaces/parachains/types.ts on lines 672..677
    packages/types/src/interfaces/parachains/types.ts on lines 680..685
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

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

    export interface ContractLayoutArray extends Struct {
      readonly offset: ContractLayoutKey;
      readonly len: u32;
      readonly cellsPerElem: u64;
      readonly layout: ContractStorageLayout;
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 19 other locations - About 55 mins to fix
    packages/types/src/interfaces/babe/types.ts on lines 30..35
    packages/types/src/interfaces/babe/types.ts on lines 129..134
    packages/types/src/interfaces/babe/types.ts on lines 159..164
    packages/types/src/interfaces/balances/types.ts on lines 8..13
    packages/types/src/interfaces/balances/types.ts on lines 23..28
    packages/types/src/interfaces/bridges/types.ts on lines 60..65
    packages/types/src/interfaces/contractsAbi/types.ts on lines 374..379
    packages/types/src/interfaces/democracy/types.ts on lines 103..108
    packages/types/src/interfaces/elections/types.ts on lines 37..42
    packages/types/src/interfaces/gilt/types.ts on lines 8..13
    packages/types/src/interfaces/gilt/types.ts on lines 16..21
    packages/types/src/interfaces/imOnline/types.ts on lines 25..30
    packages/types/src/interfaces/parachains/types.ts on lines 211..216
    packages/types/src/interfaces/parachains/types.ts on lines 247..252
    packages/types/src/interfaces/parachains/types.ts on lines 672..677
    packages/types/src/interfaces/parachains/types.ts on lines 680..685
    packages/types/src/interfaces/runtime/types.ts on lines 373..378
    packages/types/src/interfaces/staking/types.ts on lines 269..274
    packages/types/src/interfaces/system/types.ts on lines 14..19

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

    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 ContractMetadataV5 extends Struct {
      readonly types: Vec<PortableType>;
      readonly spec: ContractContractSpecV5;
      readonly version: u64;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 6 other locations - About 45 mins to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 339..343
    packages/types/src/interfaces/democracy/types.ts on lines 145..149
    packages/types/src/interfaces/identity/types.ts on lines 73..77
    packages/types/src/interfaces/mixnet/types.ts on lines 7..11
    packages/types/src/interfaces/staking/types.ts on lines 190..194
    packages/types/src/interfaces/staking/types.ts on lines 414..418

    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

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

    export interface ContractMetadataV0 extends Struct {
      readonly metadataVersion: Text;
      readonly types: Vec<Si0Type>;
      readonly spec: ContractContractSpecV0;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 6 other locations - About 45 mins to fix
    packages/types/src/interfaces/bridges/types.ts on lines 86..90
    packages/types/src/interfaces/evm/types.ts on lines 48..52
    packages/types/src/interfaces/parachains/types.ts on lines 68..72
    packages/types/src/interfaces/parachains/types.ts on lines 90..94
    packages/types/src/interfaces/scaleInfo/types.ts on lines 21..25
    packages/types/src/interfaces/session/types.ts on lines 22..26

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

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

    export interface ContractMetadataV4 extends Struct {
      readonly types: Vec<PortableType>;
      readonly spec: ContractContractSpecV4;
      readonly version: Text;
    }
    Severity: Major
    Found in packages/types/src/interfaces/contractsAbi/types.ts and 6 other locations - About 45 mins to fix
    packages/types/src/interfaces/contractsAbi/types.ts on lines 346..350
    packages/types/src/interfaces/democracy/types.ts on lines 145..149
    packages/types/src/interfaces/identity/types.ts on lines 73..77
    packages/types/src/interfaces/mixnet/types.ts on lines 7..11
    packages/types/src/interfaces/staking/types.ts on lines 190..194
    packages/types/src/interfaces/staking/types.ts on lines 414..418

    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