trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

    if (useDocker) {
      strategy = new Docker(this.strategyOptions);
    } else if (useNative) {
      strategy = new Native();
    } else if (useSpecifiedLocal) {
Severity: Major
Found in packages/compile-solidity/src/compilerSupplier/index.ts and 1 other location - About 2 hrs to fix
packages/compile-solidity/src/compilerSupplier/index.ts on lines 44..52

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

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

export const { EnumErrorResult } = createCodecComponent(
  "EnumErrorResult",
  ({ error }: Format.Errors.EnumErrorResult) =>
    isEnumError(error) ? (
      <EnumError data={error} />
packages/codec-components/src/react/components/codec/format.errors.address-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.array-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bool-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.contract-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.fixed-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-internal-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.int-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.magic-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.mapping-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.options-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.string-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.struct-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.tuple-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.type-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.ufixed-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.uint-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-error-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 81.

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

export const { FunctionExternalErrorResult } = createCodecComponent(
  "FunctionExternalErrorResult",
  ({ error }: Format.Errors.FunctionExternalErrorResult) =>
    isFunctionExternalError(error) ? (
      <FunctionExternalError data={error} />
packages/codec-components/src/react/components/codec/format.errors.address-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.array-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bool-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.contract-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.enum-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.fixed-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-internal-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.int-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.magic-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.mapping-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.options-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.string-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.struct-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.tuple-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.type-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.ufixed-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.uint-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-error-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 81.

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

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

    for (const subDir of subDirs) {
      const possiblePath = path.join(
        packagePath,
        subDir,
        `${contractName}.json`
Severity: Major
Found in packages/resolver/lib/sources/globalnpm.ts and 1 other location - About 2 hrs to fix
packages/resolver/lib/sources/npm.ts on lines 66..78

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

    "unbox:start": [
      function () {
        if (this.quiet) {
          return;
        }
Severity: Major
Found in packages/events/defaultSubscribers/unbox.js and 1 other location - About 2 hrs to fix
packages/events/defaultSubscribers/obtain.js on lines 9..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

    "obtain:start": [
      function () {
        if (this.quiet) {
          return;
        }
Severity: Major
Found in packages/events/defaultSubscribers/obtain.js and 1 other location - About 2 hrs to fix
packages/events/defaultSubscribers/unbox.js on lines 23..31

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

    for (const subDir of subDirs) {
      const possiblePath = path.join(
        packagePath,
        subDir,
        `${contractName}.json`
Severity: Major
Found in packages/resolver/lib/sources/npm.ts and 1 other location - About 2 hrs to fix
packages/resolver/lib/sources/globalnpm.ts on lines 38..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

            <C.Container prefix="{" suffix="}" empty={false}>
              <mark style={{ backgroundColor: "hsl(60,48%,60%)" }}>0x1234</mark>
              <mark style={{ backgroundColor: "hsl(60,64%,60%)" }}>
                0xbc1f71253612b66b5938e6cc90b161676ff66a905c76d8216a8c187fd42ded88941924d65b325914
              </mark>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 1 other location - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 508..523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

    try {
      return {
        compile: options =>
          String(execSync(command, { input: options, maxBuffer })),
        version: () => versionString
packages/compile-solidity/src/compilerSupplier/loadingStrategies/Docker.ts on lines 45..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

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

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

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

Refactorings

Further Reading

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

    try {
      return {
        compile: options =>
          String(execSync(command, { input: options, maxBuffer })),
        version: () => versionString
packages/compile-solidity/src/compilerSupplier/loadingStrategies/Native.ts on lines 11..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

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

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

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

Refactorings

Further Reading

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

export type Mutation<
  C extends Collections,
  M extends MutationName<C> = MutationName<C>
> = {
  [K in M]: K extends keyof CollectionMutation<C>
Severity: Major
Found in packages/db/src/meta/process/types.ts and 1 other location - About 2 hrs to fix
packages/db/src/meta/process/types.ts on lines 151..156

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

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

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

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

Refactorings

Further Reading

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

export type Query<
  C extends Collections,
  Q extends QueryName<C> = QueryName<C>
> = {
  [K in Q]: K extends keyof CollectionQuery<C> ? CollectionQuery<C>[K] : never;
Severity: Major
Found in packages/db/src/meta/process/types.ts and 1 other location - About 2 hrs to fix
packages/db/src/meta/process/types.ts on lines 176..183

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

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

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

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

Refactorings

Further Reading

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

  public async wrapElementaryValue(
    dataType: Codec.Format.Types.ElementaryType,
    input: unknown
  ): Promise<Codec.Format.Values.ElementaryValue> {
    return await this.projectEncoder.wrapElementaryValue(dataType, input);
Severity: Major
Found in packages/encoder/lib/encoders.ts and 3 other locations - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 772..777
packages/encoder/lib/encoders.ts on lines 1485..1490
packages/encoder/lib/encoders.ts on lines 1495..1500

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        <C.Container
          prefix={<mark style={{ backgroundColor: "cyan" }}>prefix</mark>}
          suffix={<mark style={{ backgroundColor: "magenta" }}>suffix</mark>}
          empty={false}
        >
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 2 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 500..506
packages/codec-components/src/docs/content.tsx on lines 525..547

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

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

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

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

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

Refactorings

Further Reading

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

  public async wrap(
    dataType: Codec.Format.Types.Type,
    input: unknown
  ): Promise<Codec.Format.Values.Value> {
    return await this.contractEncoder.wrap(dataType, input);
Severity: Major
Found in packages/encoder/lib/encoders.ts and 3 other locations - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 762..767
packages/encoder/lib/encoders.ts on lines 772..777
packages/encoder/lib/encoders.ts on lines 1485..1490

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

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

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

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

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

Refactorings

Further Reading

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

  public async wrapElementaryValue(
    dataType: Codec.Format.Types.ElementaryType,
    input: unknown
  ): Promise<Codec.Format.Values.ElementaryValue> {
    return await this.contractEncoder.wrapElementaryValue(dataType, input);
Severity: Major
Found in packages/encoder/lib/encoders.ts and 3 other locations - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 762..767
packages/encoder/lib/encoders.ts on lines 772..777
packages/encoder/lib/encoders.ts on lines 1495..1500

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

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

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

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

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

Refactorings

Further Reading

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

  public async wrap(
    dataType: Codec.Format.Types.Type,
    input: unknown
  ): Promise<Codec.Format.Values.Value> {
    return await this.projectEncoder.wrap(dataType, input);
Severity: Major
Found in packages/encoder/lib/encoders.ts and 3 other locations - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 762..767
packages/encoder/lib/encoders.ts on lines 1485..1490
packages/encoder/lib/encoders.ts on lines 1495..1500

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        <C.Container
          prefix={<mark style={{ backgroundColor: "cyan" }}>prefix</mark>}
          suffix={<mark style={{ backgroundColor: "magenta" }}>suffix</mark>}
          empty={false}
        >
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 2 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 500..506
packages/codec-components/src/docs/content.tsx on lines 508..523

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        <C.Container
          prefix={<mark style={{ backgroundColor: "cyan" }}>prefix</mark>}
          suffix={<mark style={{ backgroundColor: "magenta" }}>suffix</mark>}
          empty={false}
        >
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 2 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 508..523
packages/codec-components/src/docs/content.tsx on lines 525..547

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

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

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

  private async interpretMulticall(
    decoding: Codec.CalldataDecoding,
    transaction: DecoderTypes.Transaction,
    additionalContexts: Contexts.Contexts = {},
    additionalAllocations?: {
Severity: Major
Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
packages/decoder/lib/decoders.ts on lines 1060..1159
packages/decoder/lib/decoders.ts on lines 1230..1280
packages/decoder/lib/decoders.ts on lines 1282..1324
packages/decoder/lib/decoders.ts on lines 1326..1368

Duplicated Code

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

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

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

Tuning

This issue has a mass of 77.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language