trufflesuite/truffle

View on GitHub

Showing 1,401 of 1,401 total issues

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

export const { FunctionExternalResult } = createCodecComponent(
  "FunctionExternalResult",
  (data: Format.Values.FunctionExternalResult) =>
    isFunctionExternalValue(data) ? (
      <FunctionExternalValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { ContractResult } = createCodecComponent(
  "ContractResult",
  (data: Format.Values.ContractResult) =>
    isContractValue(data) ? (
      <ContractValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { FixedResult } = createCodecComponent(
  "FixedResult",
  (data: Format.Values.FixedResult) =>
    isFixedValue(data) ? (
      <FixedValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { TypeResult } = createCodecComponent(
  "TypeResult",
  (data: Format.Values.TypeResult) =>
    isTypeValue(data) ? (
      <TypeValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { ErrorForThrowing } = createCodecComponent(
  "ErrorForThrowing",
  (data: Format.Errors.ErrorForThrowing) =>
    isUserDefinedTypeNotFoundError(data) ? (
      <UserDefinedTypeNotFoundError data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { EnumResult } = createCodecComponent(
  "EnumResult",
  (data: Format.Values.EnumResult) =>
    isEnumValue(data) ? (
      <EnumValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

export const { AddressResult } = createCodecComponent(
  "AddressResult",
  (data: Format.Values.AddressResult) =>
    isAddressValue(data) ? (
      <AddressValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

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

  public async encodeTransaction(
    abisOrNameOrSig: Abi.FunctionEntry[] | string,
    inputs: unknown[],
    options: Types.ResolveOptions = {}
  ): Promise<Types.TxAndAbi> {
Severity: Major
Found in packages/encoder/lib/encoders.ts and 1 other location - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 917..929

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

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

  public async resolveAndWrap(
    abisOrNameOrSig: Abi.FunctionEntry[] | string,
    inputs: unknown[],
    options: Types.ResolveOptions = {}
  ): Promise<Codec.Wrap.Resolution> {
Severity: Major
Found in packages/encoder/lib/encoders.ts and 1 other location - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 1283..1299

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

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

Function begin has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function* begin() {
  const pointer = yield select(txlog.current.pointer);
  const newPointer = yield select(txlog.current.nextActionPointer);
  const origin = yield select(txlog.transaction.origin);
  debug("origin: %o", pointer);
Severity: Minor
Found in packages/debugger/lib/txlog/sagas/index.js - About 1 hr to fix

    Function recordAllocations has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function* recordAllocations() {
      const contracts = yield select(data.views.contractAllocationInfo);
      const referenceDeclarations = yield select(data.views.referenceDeclarations);
      const userDefinedTypesByCompilation = yield select(
        data.views.userDefinedTypesByCompilation
    Severity: Minor
    Found in packages/debugger/lib/data/sagas/index.js - About 1 hr to fix

      Function processDeploymentError has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        async processDeploymentError(data) {
          const error = data.estimateError || data.error;
      
          data.reason = data.error ? data.error.reason : null;
      
      
      Severity: Minor
      Found in packages/events/defaultSubscribers/migrate/Reporter.js - About 1 hr to fix

        Function setOrClearBreakpointObject has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async setOrClearBreakpointObject(breakpoint, setOrClear) {
            const existingBreakpoints = this.session.view(controller.breakpoints);
            //OK, we've constructed the breakpoint!  But if we're adding, we'll
            //want to adjust to make sure we don't set it on an empty line or
            //anything like that
        Severity: Minor
        Found in packages/core/lib/debug/interpreter.js - About 1 hr to fix

          Function merge has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            merge({ outputs, breadcrumb, output }) {
              const { compilationIndex, sourcePointer } = breadcrumb;
          
              const compilationsBefore = outputs.slice(0, compilationIndex);
              const compilation = outputs[compilationIndex];
          Severity: Minor
          Found in packages/db/src/project/loadCompile/sources.ts - About 1 hr to fix

            Function findPossibleNetworks has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const findPossibleNetworks = async (options: {
                network: Resource<"networks">;
                limit: number;
                alreadyTried: string[];
                workspace: Workspace;
            Severity: Minor
            Found in packages/db/src/resources/networks/resolvePossibleRelations.ts - About 1 hr to fix

              Function ConfirmChain has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ConfirmChain(): JSX.Element {
                const {
                  state: { chainInfo },
                  operations: { toggleNotice }
                } = useDash()!;

                Function Stack has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Stack(): JSX.Element | null {
                  const { classes } = useStyles();
                  const {
                    state: {
                      debugger: { session }
                Severity: Minor
                Found in packages/dashboard/src/components/composed/Debugger/Stack.tsx - About 1 hr to fix

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

                    deployedSourceMap: {
                      transform: function (value) {
                        if (typeof value === "string") {
                          try {
                            return JSON.parse(value);
                  Severity: Major
                  Found in packages/contract-schema/index.js and 1 other location - About 1 hr to fix
                  packages/contract-schema/index.js on lines 109..122

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

                    sourceMap: {
                      transform: function (value) {
                        if (typeof value === "string") {
                          try {
                            return JSON.parse(value);
                  Severity: Major
                  Found in packages/contract-schema/index.js and 1 other location - About 1 hr to fix
                  packages/contract-schema/index.js on lines 123..140

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

                  export const { UserDefinedTypeNotFoundError } = createCodecComponent(
                    "UserDefinedTypeNotFoundError",
                    ({ kind, type }: Format.Errors.UserDefinedTypeNotFoundError) => (
                      <CodecError kind={kind}>{type.typeName}</CodecError>
                    )
                  packages/codec-components/src/react/components/codec/format.errors.unsupported-constant-error.tsx on lines 6..11

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language