trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

export const isContractValueInfoUnknown = (
  data: Format.Values.ContractValueInfo
): data is Format.Values.ContractValueInfoUnknown => data.kind === "unknown";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionInternalRawInfoIndex = (
  data: Format.Values.FunctionInternalRawInfo
): data is Format.Values.FunctionInternalRawInfoIndex => data.kind === "index";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isStringValueInfoMalformed = (
  data: Format.Values.StringValueInfo
): data is Format.Values.StringValueInfoMalformed => data.kind === "malformed";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionExternalValueInfoUnknown = (
  data: Format.Values.FunctionExternalValueInfo
): data is Format.Values.FunctionExternalValueInfoUnknown =>
  data.kind === "unknown";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionExternalValueInfoKnown = (
  data: Format.Values.FunctionExternalValueInfo
): data is Format.Values.FunctionExternalValueInfoKnown =>
  data.kind === "known";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionInternalValueInfoUnknown = (
  data: Format.Values.FunctionInternalValueInfo
): data is Format.Values.FunctionInternalValueInfoUnknown =>
  data.kind === "unknown";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionInternalValueInfoKnown = (
  data: Format.Values.FunctionInternalValueInfo
): data is Format.Values.FunctionInternalValueInfoKnown =>
  data.kind === "function";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isContractValueInfoKnown = (
  data: Format.Values.ContractValueInfo
): data is Format.Values.ContractValueInfoKnown => data.kind === "known";
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionInternalRawInfoPcPair = (
  data: Format.Values.FunctionInternalRawInfo
): data is Format.Values.FunctionInternalRawInfoPcPair =>
  data.kind === "pcpair";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isStringValueInfoValid = (
  data: Format.Values.StringValueInfo
): data is Format.Values.StringValueInfoValid => data.kind === "valid";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5

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

export const isFunctionExternalValueInfoInvalid = (
  data: Format.Values.FunctionExternalValueInfo
): data is Format.Values.FunctionExternalValueInfoInvalid =>
  data.kind === "invalid";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

export const isFunctionInternalValueInfoException = (
  data: Format.Values.FunctionInternalValueInfo
): data is Format.Values.FunctionInternalValueInfoException =>
  data.kind === "exception";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

    maxFeePerGas: {
      get() {
        try {
          return configObject.network_config.maxFeePerGas;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 145..158
packages/config/src/configDefaults.ts on lines 197..210
packages/config/src/configDefaults.ts on lines 211..224
packages/config/src/configDefaults.ts on lines 225..238
packages/config/src/configDefaults.ts on lines 253..266
packages/config/src/configDefaults.ts on lines 267..280

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

    from: {
      get() {
        try {
          return configObject.network_config.from;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 145..158
packages/config/src/configDefaults.ts on lines 211..224
packages/config/src/configDefaults.ts on lines 225..238
packages/config/src/configDefaults.ts on lines 239..252
packages/config/src/configDefaults.ts on lines 253..266
packages/config/src/configDefaults.ts on lines 267..280

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

    maxPriorityFeePerGas: {
      get() {
        try {
          return configObject.network_config.maxPriorityFeePerGas;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 145..158
packages/config/src/configDefaults.ts on lines 197..210
packages/config/src/configDefaults.ts on lines 211..224
packages/config/src/configDefaults.ts on lines 225..238
packages/config/src/configDefaults.ts on lines 239..252
packages/config/src/configDefaults.ts on lines 267..280

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

    network_id: {
      get() {
        try {
          return configObject.network_config.network_id;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 197..210
packages/config/src/configDefaults.ts on lines 211..224
packages/config/src/configDefaults.ts on lines 225..238
packages/config/src/configDefaults.ts on lines 239..252
packages/config/src/configDefaults.ts on lines 253..266
packages/config/src/configDefaults.ts on lines 267..280

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

    gas: {
      get() {
        try {
          return configObject.network_config.gas;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 145..158
packages/config/src/configDefaults.ts on lines 197..210
packages/config/src/configDefaults.ts on lines 225..238
packages/config/src/configDefaults.ts on lines 239..252
packages/config/src/configDefaults.ts on lines 253..266
packages/config/src/configDefaults.ts on lines 267..280

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

export function readTopic(
  pointer: Pointer.EventTopicPointer,
  state: Evm.EvmState
): Uint8Array {
  //not bothering with error handling on this one as I don't expect errors
Severity: Major
Found in packages/codec/lib/topic/read/index.ts and 1 other location - About 1 hr to fix
packages/codec/lib/special/read/index.ts on lines 4..10

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

    timeoutBlocks: {
      get() {
        try {
          return configObject.network_config.timeoutBlocks;
        } catch (e) {
Severity: Major
Found in packages/config/src/configDefaults.ts and 1 other location - About 1 hr to fix
packages/config/src/configDefaults.ts on lines 299..312

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

  public async getNetworkId(): Promise<number> {
    return await this.request({
      method: "net_version",
      params: [],
      formatOutput: result => parseInt(result)
Severity: Major
Found in packages/encoder/lib/adapter.ts and 1 other location - About 1 hr to fix
packages/encoder/lib/adapter.ts on lines 251..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 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

Severity
Category
Status
Source
Language